Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize 'check' member in inflateResetKeep() #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rouault
Copy link

@rouault rouault commented Apr 15, 2018

This avoids a memory sanitizer warning in adler32_z() where the
input adler is undefined due to a call of
UPDATE(state->check, strm->next_out - out, out) at line 1269 of
inflate.c

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7541
Credit to OSS-Fuzz

This avoids a memory sanitizer warning in adler32_z() where the
input adler is undefined due to a call of
UPDATE(state->check, strm->next_out - out, out) at line 1269 of
inflate.c

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7541
Credit to OSS-Fuzz
hzhuang1 pushed a commit to Linaro/warpdrive-zlib that referenced this pull request Jul 31, 2019
This pull request attempts to fix some compiler warnings on Windows when compiled in Release mode.

```
"zlib-ng\ALL_BUILD.vcxproj" (default target) (1) ->
"zlib-ng\zlibstatic.vcxproj" (default target) (6) ->
  zlib-ng\deflate.c(1626): warning C4244: '=': conversion from 'uint16_t' to 'unsigned cha
r', possible loss of data [zlib-ng\zlibstatic.vcxproj]
  zlib-ng\deflate_fast.c(61): warning C4244: '=': conversion from 'uint16_t' to 'unsigned
char', possible loss of data [zlib-ng\zlibstatic.vcxproj]
  zlib-ng\deflate_slow.c(89): warning C4244: '=': conversion from 'uint16_t' to 'unsigned
char', possible loss of data [zlib-ng\zlibstatic.vcxproj]
```
@nmoinvaz
Copy link
Contributor

We are also currently doing this in zlib-ng and has been working well for some time. @madler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants