zlib
zlib copied to clipboard
Initialize 'check' member in inflateResetKeep()
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
We are also currently doing this in zlib-ng and has been working well for some time. @madler