From: Mark Adler Date: Thu, 30 Mar 2017 21:48:43 +0000 (-0700) Subject: Don't compute check value for raw inflate if asked to validate. X-Git-Tag: 1.9.9-b1~571 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=527e59f8167ec6eea0923025be241aec923e7cfb;p=thirdparty%2Fzlib-ng.git Don't compute check value for raw inflate if asked to validate. --- diff --git a/inflate.c b/inflate.c index ee0e5308..d17bc274 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;