Blame SOURCES/unzip-6.0-cve-2014-9636.patch
|
|
32ca9a |
diff --git a/extract.c b/extract.c
|
|
|
32ca9a |
index a0a4929..9ef80b3 100644
|
|
|
32ca9a |
--- a/extract.c
|
|
|
32ca9a |
+++ b/extract.c
|
|
|
32ca9a |
@@ -2214,6 +2214,7 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata)
|
|
|
32ca9a |
ulg eb_ucsize;
|
|
|
32ca9a |
uch *eb_ucptr;
|
|
|
32ca9a |
int r;
|
|
|
32ca9a |
+ ush method;
|
|
|
32ca9a |
|
|
|
32ca9a |
if (compr_offset < 4) /* field is not compressed: */
|
|
|
32ca9a |
return PK_OK; /* do nothing and signal OK */
|
|
|
32ca9a |
@@ -2223,6 +2224,12 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata)
|
|
|
32ca9a |
eb_size <= (compr_offset + EB_CMPRHEADLEN)))
|
|
|
32ca9a |
return IZ_EF_TRUNC; /* no compressed data! */
|
|
|
32ca9a |
|
|
|
32ca9a |
+ method = makeword(eb + (EB_HEADSIZE + compr_offset));
|
|
|
32ca9a |
+ if ((method == STORED) && (eb_size != compr_offset + EB_CMPRHEADLEN + eb_ucsize))
|
|
|
32ca9a |
+ return PK_ERR; /* compressed & uncompressed
|
|
|
32ca9a |
+ * should match in STORED
|
|
|
32ca9a |
+ * method */
|
|
|
32ca9a |
+
|
|
|
32ca9a |
if (
|
|
|
32ca9a |
#ifdef INT_16BIT
|
|
|
32ca9a |
(((ulg)(extent)eb_ucsize) != eb_ucsize) ||
|