From 5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Thu, 24 Aug 2023 02:14:23 -0400 Subject: Fix bug in inflateSync() for data held in bit buffer. --- inflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inflate.c b/inflate.c index b0757a9..94ecff0 100644 --- a/inflate.c +++ b/inflate.c @@ -1387,7 +1387,7 @@ int ZEXPORT inflateSync(z_streamp strm) { /* if first time, start search in bit buffer */ if (state->mode != SYNC) { state->mode = SYNC; - state->hold <<= state->bits & 7; + state->hold >>= state->bits & 7; state->bits -= state->bits & 7; len = 0; while (state->bits >= 8) { -- cgit v1.2.3-55-g6feb