From 5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6 Mon Sep 17 00:00:00 2001
From: Mark Adler <madler@alumni.caltech.edu>
Date: Thu, 24 Aug 2023 02:14:23 -0400
Subject: [PATCH] Fix bug in inflateSync() for data held in bit buffer.

Reference: https://github.com/madler/zlib/commit/5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6
Conflict: no
---
 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) {
-- 
2.33.0

