From: Alain Knaff Date: Thu, 8 Jan 2009 23:10:19 +0000 (-0800) Subject: bzip2/lzma: fix decompress_inflate.c vs multi-block-with-embedded-filename X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c11b12ac6f101732d43b5682f5b3ae4dda4205f;p=mv-sheeva.git 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 Signed-off-by: H. Peter Anvin --- diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index d2e7c758d1c..839a329b4fc 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;