]> git.lizzy.rs Git - zlib.git/commitdiff
Don't compute check value for raw inflate if asked to validate.
authorMark Adler <madler@alumni.caltech.edu>
Thu, 30 Mar 2017 21:48:43 +0000 (14:48 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Thu, 30 Mar 2017 21:48:43 +0000 (14:48 -0700)
inflate.c

index ac333e8c2edae90ec1145d06d9852002dd5d0617..a4b5b68c8a6ac0df179f8f649e32ab72007dc2bc 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -1531,7 +1531,7 @@ int check;
 
     if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
     state = (struct inflate_state FAR *)strm->state;
-    if (check)
+    if (check && state->wrap)
         state->wrap |= 4;
     else
         state->wrap &= ~4;