summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2023-08-24 02:14:23 -0400
committerMark Adler <madler@alumni.caltech.edu>2023-08-24 02:14:23 -0400
commit5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6 (patch)
tree01abc75d01b61ed56da18ee40691c7b097783a78
parent88e50f170525c0a6237ca5ed4db0c620af366fe7 (diff)
downloadzlib-5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6.tar.gz
zlib-5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6.tar.bz2
zlib-5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6.zip
Fix bug in inflateSync() for data held in bit buffer.
-rw-r--r--inflate.c2
1 files changed, 1 insertions, 1 deletions
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) {
1387 /* if first time, start search in bit buffer */ 1387 /* if first time, start search in bit buffer */
1388 if (state->mode != SYNC) { 1388 if (state->mode != SYNC) {
1389 state->mode = SYNC; 1389 state->mode = SYNC;
1390 state->hold <<= state->bits & 7; 1390 state->hold >>= state->bits & 7;
1391 state->bits -= state->bits & 7; 1391 state->bits -= state->bits & 7;
1392 len = 0; 1392 len = 0;
1393 while (state->bits >= 8) { 1393 while (state->bits >= 8) {