gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / unzip-CVE-2015-7697.patch
CommitLineData
51de92a0
MW
1Copied from Debian.
2
3From: Kamil Dudka <kdudka@redhat.com>
4Date: Mon, 14 Sep 2015 18:24:56 +0200
5Subject: fix infinite loop when extracting empty bzip2 data
6Bug-Debian: https://bugs.debian.org/802160
7Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=1260944
8Origin: other, https://bugzilla.redhat.com/attachment.cgi?id=1073339
9
10---
11 extract.c | 6 ++++++
12 1 file changed, 6 insertions(+)
13
14--- a/extract.c
15+++ b/extract.c
16@@ -2728,6 +2728,12 @@
17 int repeated_buf_err;
18 bz_stream bstrm;
19
20+ if (G.incnt <= 0 && G.csize <= 0L) {
21+ /* avoid an infinite loop */
22+ Trace((stderr, "UZbunzip2() got empty input\n"));
23+ return 2;
24+ }
25+
26 #if (defined(DLL) && !defined(NO_SLIDE_REDIR))
27 if (G.redirect_slide)
28 wsize = G.redirect_size, redirSlide = G.redirect_buffer;