summaryrefslogtreecommitdiff
path: root/inflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2017-03-30 14:48:43 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-01-15 10:50:50 +0100
commit527e59f8167ec6eea0923025be241aec923e7cfb (patch)
tree28e776a37a8ef2c9ff8a4eaba78d63caa486c7d2 /inflate.c
parent06bd4c8b105fc97cf4998d2ac22acbbc41df951a (diff)
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 ee0e530..d17bc27 100644
--- a/inflate.c
+++ b/inflate.c
@@ -1503,7 +1503,7 @@ int ZEXPORT PREFIX(inflateValidate)(PREFIX3(stream) *strm, int check) {
if (inflateStateCheck(strm))
return Z_STREAM_ERROR;
state = (struct inflate_state *)strm->state;
- if (check)
+ if (check && state->wrap)
state->wrap |= 4;
else
state->wrap &= ~4;