commit
74c51a0e6f
12
giflib.spec
12
giflib.spec
@ -2,12 +2,19 @@
|
|||||||
|
|
||||||
Name: giflib
|
Name: giflib
|
||||||
Version: 5.2.1
|
Version: 5.2.1
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A library and utilities for processing GIFs
|
Summary: A library and utilities for processing GIFs
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.sourceforge.net/projects/giflib/
|
URL: http://www.sourceforge.net/projects/giflib/
|
||||||
Source: http://downloads.sourceforge.net/giflib/giflib-%{version}.tar.gz
|
Source: http://downloads.sourceforge.net/giflib/giflib-%{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: make xmlto gcc
|
BuildRequires: make xmlto gcc
|
||||||
provides: giflib-utils
|
provides: giflib-utils
|
||||||
|
|
||||||
@ -56,6 +63,9 @@ rm -f %{buildroot}/debugsourcefiles.list
|
|||||||
%{_mandir}/man1/gif*.1*
|
%{_mandir}/man1/gif*.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 29 2020 hanhui <hanhui15@huawei.com> - 5.2.1-2
|
||||||
|
- add bugfix
|
||||||
|
|
||||||
* Thu Jul 23 2020 hanhui <hanhui15@huawei.com> - 5.2.1-1
|
* Thu Jul 23 2020 hanhui <hanhui15@huawei.com> - 5.2.1-1
|
||||||
- update to 5.2.1
|
- update to 5.2.1
|
||||||
|
|
||||||
|
|||||||
43
giflib_coverity.patch
Normal file
43
giflib_coverity.patch
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
12
giflib_html-docs-consistent-ids.patch
Normal file
12
giflib_html-docs-consistent-ids.patch
Normal file
@ -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 $<
|
||||||
17
giflib_quantize.patch
Normal file
17
giflib_quantize.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
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 2020-02-17 16:51:04.450397434 +0100
|
||||||
|
@@ -29,11 +29,11 @@ LIBPOINT=0
|
||||||
|
LIBVER=$(LIBMAJOR).$(LIBMINOR).$(LIBPOINT)
|
||||||
|
|
||||||
|
SOURCES = dgif_lib.c egif_lib.c gifalloc.c gif_err.c gif_font.c \
|
||||||
|
- gif_hash.c openbsd-reallocarray.c
|
||||||
|
+ gif_hash.c openbsd-reallocarray.c quantize.c
|
||||||
|
HEADERS = gif_hash.h gif_lib.h gif_lib_private.h
|
||||||
|
OBJECTS = $(SOURCES:.c=.o)
|
||||||
|
|
||||||
|
-USOURCES = qprintf.c quantize.c getarg.c
|
||||||
|
+USOURCES = qprintf.c getarg.c
|
||||||
|
UHEADERS = getarg.h
|
||||||
|
UOBJECTS = $(USOURCES:.c=.o)
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user