diff --git a/fix-null-deref.patch b/fix-null-deref.patch new file mode 100644 index 0000000..8ba59c9 --- /dev/null +++ b/fix-null-deref.patch @@ -0,0 +1,23 @@ +From f1b8e6323a8fdd029847b7efd400d5fc2ac9aecc Mon Sep 17 00:00:00 2001 +From: Eddie Kohler +Date: Tue, 26 Sep 2017 08:46:13 -0700 +Subject: [PATCH] Don't release the uncompressed image if it's all there is. + +Fix #115, #116 issues reported by Zhao Liang, Huawei Weiran Labs. +--- + src/support.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/support.c b/src/support.c +index e48075c..7978974 100644 +--- a/src/support.c ++++ b/src/support.c +@@ -1405,7 +1405,7 @@ analyze_crop(int nmerger, Gt_Crop* crop, int compress_immediately) + } + + found_right: +- if (compress_immediately > 0) ++ if (compress_immediately > 0 && srci->compressed) + Gif_ReleaseUncompressedImage(srci); + } + diff --git a/gifsicle.changes b/gifsicle.changes index 0bc53c7..292f11d 100644 --- a/gifsicle.changes +++ b/gifsicle.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 27 22:40:38 UTC 2017 - manfred99@gmx.ch + +- add fix-null-deref.patch: + upstream fix, commit f1b8e6323a8fdd029847b7efd400d5fc2ac9aecc + ------------------------------------------------------------------- Fri Aug 18 09:59:28 CEST 2017 - manfred99@gmx.ch diff --git a/gifsicle.spec b/gifsicle.spec index ba15f18..a384f63 100644 --- a/gifsicle.spec +++ b/gifsicle.spec @@ -24,6 +24,8 @@ License: GPL-2.0 Group: Productivity/Graphics/Other Url: https://www.lcdf.org/gifsicle/ Source: https://www.lcdf.org/gifsicle/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-null-deref.patch +Patch0: fix-null-deref.patch Obsoletes: ungifsicle < %{version} Provides: ungifsicle = %{version} BuildRequires: pkgconfig(x11) @@ -50,6 +52,7 @@ appearance. %prep %setup -q +%patch0 -p1 %build %configure