zlib icon indicating copy to clipboard operation
zlib copied to clipboard

Initialize 'check' member in inflateResetKeep()

Open rouault opened this issue 7 years ago • 1 comments

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

rouault avatar Apr 15 '18 15:04 rouault

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

nmoinvaz avatar Oct 12 '22 02:10 nmoinvaz