Commit 09a1572 for zlib
commit 09a1572aa624e5ddb6c075dc013880de70b1b9b9
Author: Mark Adler <git@madler.net>
Date: Sat Feb 21 23:03:37 2026 -0800
Fix inflateBack() bug that would fail to detect a too far back.
The bug would pass off an invalid deflate stream as good, and copy
uninitialized memory contents to the output.
diff --git a/infback.c b/infback.c
index e6443fe..ac96ba1 100644
--- a/infback.c
+++ b/infback.c
@@ -423,8 +423,6 @@ int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc,
/* use inflate_fast() if we have enough input and output */
if (have >= 6 && left >= 258) {
RESTORE();
- if (state->whave < state->wsize)
- state->whave = state->wsize - left;
inflate_fast(strm, state->wsize);
LOAD();
break;