summaryrefslogtreecommitdiffstats
path: root/lib/decompress_inflate.c
diff options
context:
space:
mode:
authorAlain Knaff <alain@knaff.lu>2009-01-09 00:10:19 +0100
committerH. Peter Anvin <hpa@zytor.com>2009-01-09 00:10:19 +0100
commit6c11b12ac6f101732d43b5682f5b3ae4dda4205f (patch)
tree8408be1569ac76d1ab6b9b92a96e359efd3759d4 /lib/decompress_inflate.c
parentbzip2/lzma: fix constant in decompress_inflate (diff)
downloadlinux-6c11b12ac6f101732d43b5682f5b3ae4dda4205f.tar.xz
linux-6c11b12ac6f101732d43b5682f5b3ae4dda4205f.zip
bzip2/lzma: fix decompress_inflate.c vs multi-block-with-embedded-filename
Impact: Bug fix Fix gunzip uncompression, so that it also works with files with embedded filenames that are larger than one block. Signed-off-by: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'lib/decompress_inflate.c')
-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;