Compare commits

...

No commits in common. "c8s" and "c9-beta" have entirely different histories.
c8s ... c9-beta

9 changed files with 138 additions and 125 deletions

1
.giflib.metadata Normal file
View File

@ -0,0 +1 @@
c3f774dcbdf26afded7788979c8081d33c6426dc SOURCES/giflib-5.2.1.tar.gz

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/giflib-5.1.4.tar.bz2
/giflib-5.1.4.tar.bz2
SOURCES/giflib-5.2.1.tar.gz

View 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);
}
}

View 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 $<

View 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)

View File

@ -1,16 +1,18 @@
Name: giflib
Summary: A library and utilities for processing GIFs
Version: 5.1.4
Release: 3%{?dist}
Version: 5.2.1
Release: 9%{?dist}
License: MIT
URL: http://www.sourceforge.net/projects/%{name}/
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
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
Patch0: giflib-5.1.4-coverity.patch
Patch1: giflib-5.1.4-html-docs-consistent-ids.patch
BuildRequires: autoconf automake libtool
BuildRequires: gcc
BuildRequires: make
BuildRequires: xmlto
@ -43,28 +45,21 @@ format image files.
%build
autoreconf -vif
%configure
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build
%make_build CFLAGS="%{optflags} -fPIC" LDFLAGS="%{__global_ldflags}"
%install
%make_install
%make_install PREFIX="%{_prefix}" LIBDIR="%{_libdir}"
# Don't install any static .a and libtool .la files
rm -f %{buildroot}%{_libdir}/*.{a,la}
# Remove makefile relics from documentation
rm -f doc/Makefile*
# Drop static library
rm -f %{buildroot}%{_libdir}/libgif.a
%ldconfig_scriptlets
%files
%doc AUTHORS ChangeLog NEWS README
%files
%doc ChangeLog NEWS README
%license COPYING
%{_libdir}/libgif.so.7*
@ -75,17 +70,59 @@ rm -f doc/Makefile*
%files utils
%{_bindir}/gif*
%{_mandir}/man1/gif*.1*
%{_mandir}/man1/*.1*
%changelog
* Thu Nov 08 2018 Nikola Forró <nforro@redhat.com> - 5.1.4-3
- Generate HTML docs with consistent section IDs to avoid multilib difference
related: #1602513
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 5.2.1-9
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Oct 29 2018 Nikola Forró <nforro@redhat.com> - 5.1.4-2
- Fix important Covscan defects
resolves: #1602513
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 5.2.1-8
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Feb 17 2020 Sandro Mani <manisandro@gmail.com> - 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 <releng@fedoraproject.org> - 5.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Oct 01 2019 Sandro Mani <manisandro@gmail.com> - 5.2.1-3
- Move quantize.c back into libgif.so (#1750122)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jun 28 2019 Sandro Mani <manisandro@gmail.com> - 5.2.1-1
- Update to 5.2.1
* Mon Apr 01 2019 Sandro Mani <manisandro@gmail.com> - 5.1.9-1
- Update to 5.1.9
* Wed Mar 20 2019 Sandro Mani <manisandro@gmail.com> - 5.1.8-1
- Update to 5.1.8
* Mon Mar 11 2019 Sandro Mani <manisandro@gmail.com> - 5.1.7-1
- Update to 5.1.7
* Sat Feb 23 2019 Sandro Mani <manisandro@gmail.com> - 5.1.6-2
- Fix broken soname
* Mon Feb 18 2019 Sandro Mani <manisandro@gmail.com> - 5.1.6-1
- Update to 5.1.6
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Feb 11 2018 Sandro Mani <manisandro@gmail.com> - 5.1.4-1
- Update to 5.1.4

View File

@ -1,82 +0,0 @@
diff --git a/util/gif2rgb.c b/util/gif2rgb.c
index e39f37b..92bf82f 100644
--- a/util/gif2rgb.c
+++ b/util/gif2rgb.c
@@ -171,6 +171,8 @@ static void SaveGif(GifByteType *OutputBuffer,
/* Open stdout for the output file: */
if ((GifFile = EGifOpenFileHandle(1, &Error)) == NULL) {
PrintGifError(Error);
+ free(OutputBuffer);
+ GifFreeMapObject(OutputColorMap);
exit(EXIT_FAILURE);
}
@@ -179,25 +181,34 @@ static void SaveGif(GifByteType *OutputBuffer,
OutputColorMap) == GIF_ERROR ||
EGifPutImageDesc(GifFile,
0, 0, Width, Height, false, NULL) ==
- GIF_ERROR)
+ GIF_ERROR) {
PrintGifError(Error);
+ free(OutputBuffer);
+ GifFreeMapObject(OutputColorMap);
exit(EXIT_FAILURE);
+ }
GifQprintf("\n%s: Image 1 at (%d, %d) [%dx%d]: ",
PROGRAM_NAME, GifFile->Image.Left, GifFile->Image.Top,
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;
}
- if (EGifCloseFile(GifFile, &Error) == GIF_ERROR)
+ if (EGifCloseFile(GifFile, &Error) == GIF_ERROR) {
PrintGifError(Error);
+ free(OutputBuffer);
+ GifFreeMapObject(OutputColorMap);
exit(EXIT_FAILURE);
+ }
}
/******************************************************************************
diff --git a/util/gifsponge.c b/util/gifsponge.c
index 6e248d8..12bce36 100644
--- a/util/gifsponge.c
+++ b/util/gifsponge.c
@@ -73,8 +73,7 @@ int main(int argc, char **argv)
* data; it's *your* responsibility to keep your changes consistent.
* Caveat hacker!
*/
- if (EGifSpew(GifFileOut) == GIF_ERROR)
- PrintGifError(GifFileOut->Error);
+ EGifSpew(GifFileOut);
if (DGifCloseFile(GifFileIn, &ErrorCode) == GIF_ERROR)
PrintGifError(ErrorCode);
diff --git a/util/giftool.c b/util/giftool.c
index e61281c..fe6325c 100644
--- a/util/giftool.c
+++ b/util/giftool.c
@@ -565,9 +565,9 @@ int main(int argc, char **argv)
for (i = 0; i < GifFileIn->ImageCount; i++)
(void) GifMakeSavedImage(GifFileOut, &GifFileIn->SavedImages[i]);
- if (EGifSpew(GifFileOut) == GIF_ERROR)
- PrintGifError(GifFileOut->Error);
- else if (DGifCloseFile(GifFileIn, &ErrorCode) == GIF_ERROR)
+ EGifSpew(GifFileOut);
+
+ if (DGifCloseFile(GifFileIn, &ErrorCode) == GIF_ERROR)
PrintGifError(ErrorCode);
return 0;

View File

@ -1,13 +0,0 @@
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b9696ea..698104b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,7 +1,7 @@
SUFFIXES = .xml .html .txt .asc .1
.xml.html:
- xmlto xhtml-nochunks $<
+ xmlto --stringparam generate.consistent.ids=1 xhtml-nochunks $<
.xml.1:
xmlto man $<

View File

@ -1 +0,0 @@
SHA512 (giflib-5.1.4.tar.bz2) = 32b5e342056c210e6478e9cb3b6ceec9594dcfaf34feea1eb4dad633a081ed4465bceee578c19165907cb47cb83912ac359ceea666a8e07dbbb5420f9928f96d