lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  8 Jan 2009 15:28:59 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Alain Knaff <alain@...ff.lu>, Sam Ravnborg <sam@...nborg.org>,
	x86@...nel.org
Cc:	linux-kernel@...r.kernel.org, Alain Knaff <alain@...ff.lu>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH] bzip2/lzma: fix decompress_inflate.c vs multi-block-with-embedded-filename

From: Alain Knaff <alain@...ff.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@...ff.lu>
Signed-off-by: H. Peter Anvin <hpa@...or.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ