From df94d26a07ac8772b3380f4e5b4145daa7bf65e1 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Mon, 17 Feb 2020 17:01:19 +0100 Subject: [PATCH] Add giflib_coverity.patch, giflib_html-docs-consistent-ids.patch --- giflib.spec | 10 ++++++- giflib_coverity.patch | 43 +++++++++++++++++++++++++++ giflib_html-docs-consistent-ids.patch | 12 ++++++++ giflib_quantize.patch | 4 +-- 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 giflib_coverity.patch create mode 100644 giflib_html-docs-consistent-ids.patch diff --git a/giflib.spec b/giflib.spec index 26efcd6..ee8b679 100644 --- a/giflib.spec +++ b/giflib.spec @@ -1,13 +1,17 @@ Name: giflib Summary: A library and utilities for processing GIFs Version: 5.2.1 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT URL: http://www.sourceforge.net/projects/%{name}/ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # Move quantize.c back into libgif.so (#1750122) Patch0: giflib_quantize.patch +# Fix several defects found by Coverity scan +Patch1: giflib_coverity.patch +# Generate HTML docs with consistent section IDs to avoid multilib difference +Patch2: giflib_html-docs-consistent-ids.patch BuildRequires: gcc BuildRequires: make @@ -70,6 +74,10 @@ rm -f %{buildroot}%{_libdir}/libgif.a %changelog +* Mon Feb 17 2020 Sandro Mani - 5.2.1-5 +- Fix several defects found by Coverity scan +- Generate HTML docs with consistent section IDs to avoid multilib difference + * Tue Jan 28 2020 Fedora Release Engineering - 5.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/giflib_coverity.patch b/giflib_coverity.patch new file mode 100644 index 0000000..c51234f --- /dev/null +++ b/giflib_coverity.patch @@ -0,0 +1,43 @@ +diff -rupN --no-dereference giflib-5.2.1/gif2rgb.c giflib-5.2.1-new/gif2rgb.c +--- giflib-5.2.1/gif2rgb.c 2019-06-24 09:24:27.000000000 +0200 ++++ giflib-5.2.1-new/gif2rgb.c 2020-02-17 16:51:04.468397502 +0100 +@@ -170,6 +170,8 @@ static void SaveGif(GifByteType *OutputB + /* Open stdout for the output file: */ + if ((GifFile = EGifOpenFileHandle(1, &Error)) == NULL) { + PrintGifError(Error); ++ free(OutputBuffer); ++ GifFreeMapObject(OutputColorMap); + exit(EXIT_FAILURE); + } + +@@ -179,6 +181,8 @@ static void SaveGif(GifByteType *OutputB + EGifPutImageDesc(GifFile, + 0, 0, Width, Height, false, NULL) == GIF_ERROR) { + PrintGifError(Error); ++ free(OutputBuffer); ++ GifFreeMapObject(OutputColorMap); + exit(EXIT_FAILURE); + } + +@@ -187,8 +191,11 @@ static void SaveGif(GifByteType *OutputB + GifFile->Image.Width, GifFile->Image.Height); + + for (i = 0; i < Height; i++) { +- if (EGifPutLine(GifFile, Ptr, Width) == GIF_ERROR) ++ if (EGifPutLine(GifFile, Ptr, Width) == GIF_ERROR) { ++ free(OutputBuffer); ++ GifFreeMapObject(OutputColorMap); + exit(EXIT_FAILURE); ++ } + GifQprintf("\b\b\b\b%-4d", Height - i - 1); + + Ptr += Width; +@@ -196,6 +203,8 @@ static void SaveGif(GifByteType *OutputB + + if (EGifCloseFile(GifFile, &Error) == GIF_ERROR) { + PrintGifError(Error); ++ free(OutputBuffer); ++ GifFreeMapObject(OutputColorMap); + exit(EXIT_FAILURE); + } + } diff --git a/giflib_html-docs-consistent-ids.patch b/giflib_html-docs-consistent-ids.patch new file mode 100644 index 0000000..d4006ea --- /dev/null +++ b/giflib_html-docs-consistent-ids.patch @@ -0,0 +1,12 @@ +diff -rupN --no-dereference giflib-5.2.1/doc/Makefile giflib-5.2.1-new/doc/Makefile +--- giflib-5.2.1/doc/Makefile 2019-03-28 18:05:25.000000000 +0100 ++++ giflib-5.2.1-new/doc/Makefile 2020-02-17 16:51:04.489397582 +0100 +@@ -1,7 +1,7 @@ + .SUFFIXES: .xml .html .txt .adoc .1 + + .xml.html: +- xmlto xhtml-nochunks $< ++ xmlto --stringparam generate.consistent.ids=1 xhtml-nochunks $< + + .xml.1: + xmlto man $< diff --git a/giflib_quantize.patch b/giflib_quantize.patch index ce1f22c..aa34629 100644 --- a/giflib_quantize.patch +++ b/giflib_quantize.patch @@ -1,6 +1,6 @@ -diff -rupN giflib-5.2.1/Makefile giflib-5.2.1-new/Makefile +diff -rupN --no-dereference giflib-5.2.1/Makefile giflib-5.2.1-new/Makefile --- giflib-5.2.1/Makefile 2019-06-24 18:08:57.000000000 +0200 -+++ giflib-5.2.1-new/Makefile 2019-10-01 13:02:33.227952230 +0200 ++++ giflib-5.2.1-new/Makefile 2020-02-17 16:51:04.450397434 +0100 @@ -29,11 +29,11 @@ LIBPOINT=0 LIBVER=$(LIBMAJOR).$(LIBMINOR).$(LIBPOINT)