gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / unzip-CVE-2014-9636.patch
1 Copied from Fedora.
2
3 http://pkgs.fedoraproject.org/cgit/unzip.git/plain/unzip-6.0-overflow.patch?id=d18f821e
4
5 diff --git a/extract.c b/extract.c
6 index a0a4929..9ef80b3 100644
7 --- a/extract.c
8 +++ b/extract.c
9 @@ -2214,6 +2214,7 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata)
10 ulg eb_ucsize;
11 uch *eb_ucptr;
12 int r;
13 + ush method;
14
15 if (compr_offset < 4) /* field is not compressed: */
16 return PK_OK; /* do nothing and signal OK */
17 @@ -2223,6 +2224,12 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata)
18 eb_size <= (compr_offset + EB_CMPRHEADLEN)))
19 return IZ_EF_TRUNC; /* no compressed data! */
20
21 + method = makeword(eb + (EB_HEADSIZE + compr_offset));
22 + if ((method == STORED) && (eb_size != compr_offset + EB_CMPRHEADLEN + eb_ucsize))
23 + return PK_ERR; /* compressed & uncompressed
24 + * should match in STORED
25 + * method */
26 +
27 if (
28 #ifdef INT_16BIT
29 (((ulg)(extent)eb_ucsize) != eb_ucsize) ||