From: Mark Adler Date: Mon, 29 Jan 2024 03:26:17 +0000 (-0800) Subject: Fix bug in inflateSync() for data held in bit buffer. X-Git-Tag: 2.2.0~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4c236c4f0eb23ebf58da6786c43e1a60a30443a;p=thirdparty%2Fzlib-ng.git Fix bug in inflateSync() for data held in bit buffer. madler/zlib#5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6 --- diff --git a/inflate.c b/inflate.c index 37104e6e..0b86cc1d 100644 --- a/inflate.c +++ b/inflate.c @@ -1269,7 +1269,7 @@ int32_t Z_EXPORT PREFIX(inflateSync)(PREFIX3(stream) *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) {