summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/decompress_inflate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
index d2e7c758d1ca..839a329b4fc4 100644
--- a/lib/decompress_inflate.c
+++ b/lib/decompress_inflate.c
@@ -97,7 +97,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len,
strm->next_in++;
strm->next_in++;
}
- strm->avail_in = len - 10;
+ strm->avail_in = len - (strm->next_in - zbuf);
strm->next_out = out_buf;
strm->avail_out = out_len;