From 89245c0a84eac0c5cfc6f0eb2fe72854f4b2c9e6 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Thu, 30 Mar 2017 14:48:43 -0700 Subject: [PATCH] Don't compute check value for raw inflate if asked to validate. --- inflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;