summaryrefslogtreecommitdiff
path: root/inflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2017-03-30 14:48:43 -0700
committerMark Adler <madler@alumni.caltech.edu>2017-03-30 14:48:43 -0700
commit89245c0a84eac0c5cfc6f0eb2fe72854f4b2c9e6 (patch)
tree333f173ff6f35c70228b0b8c9eebf2d2d30b1aab /inflate.c
parentbe5e3647c4aca626dcfa833ae2455b7af21b60b3 (diff)
downloadzlib-89245c0a84eac0c5cfc6f0eb2fe72854f4b2c9e6.tar.gz
Don't compute check value for raw inflate if asked to validate.
Diffstat (limited to 'inflate.c')
-rw-r--r--inflate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/inflate.c b/inflate.c
index ac333e8..a4b5b68 100644
--- 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;