]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Don't overwrite adler32 hash with crc32 hash. #1066
authorNathan Moinvaziri <nathan@nathanm.com>
Tue, 7 Dec 2021 20:52:05 +0000 (15:52 -0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 9 Dec 2021 13:28:34 +0000 (14:28 +0100)
inflate.c

index 1abb0290f61a5a8de98a22ebb6dd5e0d22156633..38faefe2c975e30ca766836dc2dd81ecea5230d0 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -926,7 +926,7 @@ int32_t Z_EXPORT PREFIX(inflate)(PREFIX3(stream) *strm, int32_t flush) {
                 state->total += out;
 
                 if (INFLATE_NEED_CHECKSUM(strm) && strm->total_out) {
-                    if (state->wrap & 2)
+                    if (state->flags)
                         strm->adler = state->check = functable.crc32_fold_final(&state->crc_fold);
                 }
                 out = left;