Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix oss-fuzz/11323: clear out s->prev buffer
zlib-ng compiled with MSAN used to fail with: SUMMARY: MemorySanitizer: use-of-uninitialized-value /src/zlib-ng/match.c:473:60 in longest_match Exiting Uninitialized value was stored to memory at #0 0x7fcaced77645 in fill_window_sse /src/zlib-ng/arch/x86/fill_window_sse.c:84:17 zlib-ng#1 0x7fcaced7d3d4 in deflate_quick /src/zlib-ng/arch/x86/deflate_quick.c:230:13 zlib-ng#2 0x7fcaced2f54b in zng_deflate /src/zlib-ng/deflate.c:951:18 zlib-ng#3 0x4a04e9 in test_large_deflate /src/zlib-ng/test/example.c:266:11 zlib-ng#4 0x4a38d2 in main /src/zlib-ng/test/example.c:539:5 zlib-ng#5 0x7fcace96a82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) Uninitialized value was created by a heap allocation #0 0x45bf70 in malloc /src/llvm/projects/compiler-rt/lib/msan/msan_interceptors.cc:910 zlib-ng#1 0x7fcaced26cd9 in zng_deflateInit2_ /src/zlib-ng/deflate.c:315:26 zlib-ng#2 0x7fcaced2605a in zng_deflateInit_ /src/zlib-ng/deflate.c:224:12 zlib-ng#3 0x4a03c5 in test_large_deflate /src/zlib-ng/test/example.c:255:11 zlib-ng#4 0x4a38d2 in main /src/zlib-ng/test/example.c:539:5 zlib-ng#5 0x7fcace96a82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
- Loading branch information