rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / archiver / unzip / patches / CVE-2015-7696.patch
blob91482dae059ac76bd40e42cde5c7d3472d851c26
1 From: Petr Stodulka <pstodulk@redhat.com>
2 Date: Mon, 14 Sep 2015 18:23:17 +0200
3 Subject: Upstream fix for heap overflow
4 Bug-Debian: https://bugs.debian.org/802162
5 Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=1260944
6 Origin: https://bugzilla.redhat.com/attachment.cgi?id=1073002
7 Forwarded: yes
9 ---
10 crypt.c | 12 +++++++++++-
11 1 file changed, 11 insertions(+), 1 deletion(-)
13 --- a/crypt.c
14 +++ b/crypt.c
15 @@ -465,7 +465,17 @@
16 GLOBAL(pInfo->encrypted) = FALSE;
17 defer_leftover_input(__G);
18 for (n = 0; n < RAND_HEAD_LEN; n++) {
19 - b = NEXTBYTE;
20 + /* 2012-11-23 SMS. (OUSPG report.)
21 + * Quit early if compressed size < HEAD_LEN. The resulting
22 + * error message ("unable to get password") could be improved,
23 + * but it's better than trying to read nonexistent data, and
24 + * then continuing with a negative G.csize. (See
25 + * fileio.c:readbyte()).
26 + */
27 + if ((b = NEXTBYTE) == (ush)EOF)
28 + {
29 + return PK_ERR;
30 + }
31 h[n] = (uch)b;
32 Trace((stdout, " (%02x)", h[n]));