1 From 68efed87fabddd450c08f3112f62a73f61d493c9 Mon Sep 17 00:00:00 2001
2 From: Petr Stodulka <pstodulk@redhat.com>
3 Date: Mon, 14 Sep 2015 18:23:17 +0200
4 Subject: [PATCH 1/2] upstream fix for heap overflow
6 https://bugzilla.redhat.com/attachment.cgi?id=1073002
8 crypt.c | 12 +++++++++++-
9 1 file changed, 11 insertions(+), 1 deletion(-)
11 diff --git a/crypt.c b/crypt.c
12 index 784e411..a8975f2 100644
15 @@ -465,7 +465,17 @@ int decrypt(__G__ passwrd)
16 GLOBAL(pInfo->encrypted) = FALSE;
17 defer_leftover_input(__G);
18 for (n = 0; n < RAND_HEAD_LEN; n++) {
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()).
27 + if ((b = NEXTBYTE) == (ush)EOF)
32 Trace((stdout, " (%02x)", h[n]));
38 From bd8a743ee0a77e65ad07ef4196c4cd366add3f26 Mon Sep 17 00:00:00 2001
39 From: Kamil Dudka <kdudka@redhat.com>
40 Date: Mon, 14 Sep 2015 18:24:56 +0200
41 Subject: [PATCH 2/2] fix infinite loop when extracting empty bzip2 data
45 1 file changed, 6 insertions(+)
47 diff --git a/extract.c b/extract.c
48 index 7134bfe..29db027 100644
51 @@ -2733,6 +2733,12 @@ __GDEF
55 + if (G.incnt <= 0 && G.csize <= 0L) {
56 + /* avoid an infinite loop */
57 + Trace((stderr, "UZbunzip2() got empty input\n"));
61 #if (defined(DLL) && !defined(NO_SLIDE_REDIR))
63 wsize = G.redirect_size, redirSlide = G.redirect_buffer;