commit 9d1a705bbf6e5b41f87bd0e80d912db56feec30a Author: MSVSphere Packaging Team Date: Wed Jan 10 01:54:53 2024 +0300 import optipng-0.7.8-1.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e544602 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/optipng-0.7.8.tar.gz diff --git a/.optipng.metadata b/.optipng.metadata new file mode 100644 index 0000000..8253f51 --- /dev/null +++ b/.optipng.metadata @@ -0,0 +1 @@ +f072e98910f89d53d4dcda80566db39bebbad919 SOURCES/optipng-0.7.8.tar.gz diff --git a/SOURCES/0001-Prevent-integer-overflow-bug-65-CVE-2017-1000229.patch b/SOURCES/0001-Prevent-integer-overflow-bug-65-CVE-2017-1000229.patch new file mode 100644 index 0000000..19dc3ad --- /dev/null +++ b/SOURCES/0001-Prevent-integer-overflow-bug-65-CVE-2017-1000229.patch @@ -0,0 +1,25 @@ +From 77ac8e9fd9b2c1aeec3951e2bb50f7cc2c1e92d2 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sun, 19 Nov 2017 16:04:26 +0100 +Subject: [PATCH] Prevent integer overflow (bug #65, CVE-2017-1000229) + +--- + src/minitiff/tiffread.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/minitiff/tiffread.c b/src/minitiff/tiffread.c +index b4910ec..5f9b376 100644 +--- a/src/minitiff/tiffread.c ++++ b/src/minitiff/tiffread.c +@@ -350,6 +350,8 @@ minitiff_read_info(struct minitiff_info *tiff_ptr, FILE *fp) + count = tiff_ptr->strip_offsets_count; + if (count == 0 || count > tiff_ptr->height) + goto err_invalid; ++ if (count > (size_t)-1 / sizeof(long)) ++ goto err_memory; + tiff_ptr->strip_offsets = (long *)malloc(count * sizeof(long)); + if (tiff_ptr->strip_offsets == NULL) + goto err_memory; +-- +2.14.2 + diff --git a/SOURCES/optipng-076-sfbug-69.patch b/SOURCES/optipng-076-sfbug-69.patch new file mode 100644 index 0000000..76246a2 --- /dev/null +++ b/SOURCES/optipng-076-sfbug-69.patch @@ -0,0 +1,45 @@ +From e05fb81a20541833a2d62ce08552b18c0920b9a1 Mon Sep 17 00:00:00 2001 +From: Cosmin Truta +Date: Sat, 25 Nov 2017 23:17:46 -0500 +Subject: [PATCH] gifread: Detect indirect circular dependencies in LZW tables + +--- + src/gifread/gifread.c | 4 +++- + src/gifread/gifread.h | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/gifread/gifread.c b/src/gifread/gifread.c +index 0123456789abcdef..0123456789abcdef 100644 +--- a/src/gifread/gifread.c ++++ b/src/gifread/gifread.c +@@ -5,7 +5,7 @@ + * @author Cosmin Truta + * + * @section Copyright +- * Copyright (C) 2003-2015 Cosmin Truta. ++ * Copyright (C) 2003-2017 Cosmin Truta. + * This software was derived from "giftopnm.c" by David Koblas, + * and is distributed under the same copyright and warranty terms. + * +@@ -499,6 +499,8 @@ static int LZWReadByte(int init_flag, int input_code_size, FILE *stream) + *sp++ = table[1][code]; + if (code == table[0][code]) + GIFError("GIF/LZW error: circular table entry"); ++ if ((size_t)(sp - stack) >= sizeof(stack) / sizeof(stack[0])) ++ GIFError("GIF/LZW error: circular table"); + code = table[0][code]; + } + +diff --git a/src/gifread/gifread.h b/src/gifread/gifread.h +index 0123456789abcdef..0123456789abcdef 100644 +--- a/src/gifread/gifread.h ++++ b/src/gifread/gifread.h +@@ -5,7 +5,7 @@ + * @author Cosmin Truta + * + * @section Copyright +- * Copyright (C) 2003-2015 Cosmin Truta. ++ * Copyright (C) 2003-2017 Cosmin Truta. + * This software was derived from "giftopnm.c" by David Koblas, + * and is distributed under the same copyright and warranty terms. + * diff --git a/SPECS/optipng.spec b/SPECS/optipng.spec new file mode 100644 index 0000000..36d2935 --- /dev/null +++ b/SPECS/optipng.spec @@ -0,0 +1,249 @@ +Name: optipng +Version: 0.7.8 +Release: 1%{?dist} +Summary: PNG optimizer and converter + +License: zlib +URL: http://optipng.sourceforge.net/ +Source0: http://downloads.sourceforge.net/optipng/%{name}-%{version}.tar.gz + +BuildRequires: make +BuildRequires: gcc +BuildRequires: zlib-devel libpng-devel + +%description +OptiPNG is a PNG optimizer that recompresses image files to a smaller size, +without losing any information. This program also converts external formats +(BMP, GIF, PNM and TIFF) to optimized PNG, and performs PNG integrity checks +and corrections. + + +%prep +%setup -q +for f in AUTHORS.txt doc/history.txt ; do + iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f +done + +# Ensure system libs and headers are used; as of 0.6.3 pngxtern will use +# the bundled headers if present even with -with-system-*, causing failures. +rm -rf src/libpng src/zlib + + +%build +%set_build_flags +./configure -prefix=%{_prefix} -mandir=%{_mandir} \ + -with-system-zlib -with-system-libpng +%make_build + + +%install +rm -rf $RPM_BUILD_ROOT +%make_install +chmod -c 755 $RPM_BUILD_ROOT%{_bindir}/optipng + + +%check +%__make test + + +%files +%{!?_licensedir:%global license %%doc} +%license LICENSE.txt +%doc AUTHORS.txt README.txt doc/* +%{_bindir}/optipng +%{_mandir}/man1/optipng.1* + + +%changelog +* Wed Jan 10 2024 MSVSphere Packaging Team - 0.7.8-1 +- Rebuilt for MSVSphere 9.3 + +* Sun Nov 5 2023 Peter Hanecak - 0.7.8-1 +- Update to 0.7.8 + +* Thu Jul 20 2023 Fedora Release Engineering - 0.7.7-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 0.7.7-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 0.7.7-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 0.7.7-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.7.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 0.7.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Dec 10 2020 Peter Hanecak - 0.7.7-6 +- Use make macros (PR from tbaeder) + +* Tue Jul 28 2020 Fedora Release Engineering - 0.7.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 0.7.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.7.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.7.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Peter Hanecak - 0.7.7-1 +- Update to 0.7.7 +- Dropped pathes (both CVEs fixed in 0.7.7) +- Added BuildRequires: gcc + (https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot) + +* Fri Jul 13 2018 Fedora Release Engineering - 0.7.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 0.7.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Dec 04 2017 Till Maas - 0.7.6-6 +- Actually apply patches + +* Mon Dec 04 2017 Till Maas - 0.7.6-5 +- Add patches for CVE-2017-1000229 and CVE-2017-16938 +- Cleanup spec + +* Thu Aug 03 2017 Fedora Release Engineering - 0.7.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.7.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.7.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Apr 5 2016 Ville Skyttä - 0.7.6-1 +- Update to 0.7.6 + +* Thu Feb 04 2016 Fedora Release Engineering - 0.7.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jan 26 2016 Ville Skyttä - 0.7.5-6 +- Remove unnecessary %%defattr + +* Thu Jun 18 2015 Fedora Release Engineering - 0.7.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jan 31 2015 Ville Skyttä - 0.7.5-4 +- Ship LICENSE.txt as %%license where available + +* Sun Aug 17 2014 Fedora Release Engineering - 0.7.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.7.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Mar 26 2014 Ville Skyttä - 0.7.5-1 +- Update to 0.7.5 + +* Sat Aug 03 2013 Fedora Release Engineering - 0.7.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.7.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Oct 22 2012 Ville Skyttä - 0.7.4-1 +- Update to 0.7.4. + +* Mon Sep 17 2012 Ville Skyttä - 0.7.3-1 +- Update to 0.7.3. + +* Sat Aug 25 2012 Ville Skyttä - 0.7.2-1 +- Update to 0.7.2. +- Build unit test code with $RPM_(OPT|LD)_FLAGS. + +* Fri Jul 20 2012 Fedora Release Engineering - 0.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Mar 24 2012 Ville Skyttä - 0.7.1-1 +- Update to 0.7.1. + +* Fri Mar 2 2012 Ville Skyttä - 0.7-1 +- Update to 0.7. +- Build with $RPM_LD_FLAGS. + +* Fri Jan 13 2012 Fedora Release Engineering - 0.6.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 06 2011 Adam Jackson - 0.6.5-2 +- Rebuild for new libpng + +* Thu Apr 28 2011 Ville Skyttä - 0.6.5-1 +- Update to 0.6.5. +- Patch to fix setjmp.h duplicate inclusion with system libpng. + +* Tue Feb 08 2011 Fedora Release Engineering - 0.6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat May 15 2010 Till Maas - 0.6.4-1 +- update to new release + +* Sat Jul 25 2009 Fedora Release Engineering - 0.6.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sun Jul 19 2009 Ville Skyttä - 0.6.3-1 +- Update to 0.6.3. +- Use %%global instead of %%define. + +* Wed Feb 25 2009 Till Maas - 0.6.2.1-1 +- Update to new release to fix array overflow +- Red Hat Bugzilla #487364 + +* Wed Nov 12 2008 Till Maas - 0.6.2-1 +- Update to new release to fix buffer overflow +- Red Hat Bugzilla #471206 + +* Thu Aug 28 2008 Ville Skyttä - 0.6.1-1 +- 0.6.1. + +* Thu Feb 14 2008 Ville Skyttä - 0.5.5-4 +- Apply sf.net patch #1790969 to fix crash with -log. +- Cosmetic specfile changes. + +* Thu Aug 02 2007 Till Maas - 0.5.5-3 +- update License: Tag according to new Guidelines + +* Wed Feb 14 2007 Till Maas - 0.5.5-2 +- rebuild because of new libpng + +* Tue Feb 06 2007 Till Maas - 0.5.5-1 +- Version bump + +* Wed Nov 29 2006 Till Maas - 0.5.4-4 +- splitting makefile patches +- make LDFLAGS=$RPM_OPT_FLAGS +- Use own makefile define +- Fixing 216784 with upstream patch + +* Wed Oct 11 2006 Till Maas - 0.5.4-3 +- bumping release because of errors while importing to extras + +* Tue Oct 10 2006 Till Maas - 0.5.4-2 +- shortening Summary + +* Thu Sep 14 2006 Till Maas - 0.5.4-1 +- version bump +- use system zlib and libpng +- link without "-s" flag for non-empty debuginfo +- use DESTDIR + +* Fri Jul 28 2006 Till Maas - 0.5.3-1 +- version bump +- Changed license tag back to zlib/libpng (#198616 rpmlint) +- use $RPM_OPT_FLAGS instead of %%{optflags} + +* Thu Jul 06 2006 Till Maas - 0.5.2-2 +- Changed license tag from zlib/libpng to zlib + +* Tue Jul 04 2006 Till Maas - 0.5.2-1 +- Created from scratch for fedora extras