lkml.org 
[lkml]   [2009]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] bzip2/lzma: fix decompress_inflate.c vs multi-block-with-embedded-filename
Date
From: Alain Knaff <alain@knaff.lu>

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>
---
lib/decompress_inflate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
index d2e7c75..839a329 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;
--
1.5.6.6


\
 
 \ /
  Last update: 2009-01-09 00:33    [W:0.344 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site