From d259e194df12569c8fe286eacd285be28118ecd7 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 7 Nov 2026 06:22:11 +0000 Subject: automatic import of zlib --- ...n-inflateSync-for-data-held-in-bit-buffer.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 backport-Fix-bug-in-inflateSync-for-data-held-in-bit-buffer.patch (limited to 'backport-Fix-bug-in-inflateSync-for-data-held-in-bit-buffer.patch') diff --git a/backport-Fix-bug-in-inflateSync-for-data-held-in-bit-buffer.patch b/backport-Fix-bug-in-inflateSync-for-data-held-in-bit-buffer.patch new file mode 100644 index 0000000..0bcac9f --- /dev/null +++ b/backport-Fix-bug-in-inflateSync-for-data-held-in-bit-buffer.patch @@ -0,0 +1,27 @@ +From 5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6 Mon Sep 17 00:00:00 2001 +From: Mark Adler +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 + -- cgit v1.2.3