From 6d589790e44382a8d07ad339be383083a99d4d06 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 16 Oct 2012 12:06:10 -0500 Subject: [PATCH] 1.3.17-1 - GraphicsMagick-1.3.17 (#866377) - GraphicsMagick 1.3.13 update breaks some PNGs (#788246) - --enable-quantum-library-names on f19+ --- .gitignore | 2 +- GraphicsMagick-CVE-2012-3438.patch | 65 ------------------------------ GraphicsMagick.spec | 30 +++++++++----- sources | 2 +- 4 files changed, 21 insertions(+), 78 deletions(-) delete mode 100644 GraphicsMagick-CVE-2012-3438.patch diff --git a/.gitignore b/.gitignore index e8af774..ef90b67 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/GraphicsMagick-1.3.16.tar.xz +/GraphicsMagick-1.3.17.tar.xz diff --git a/GraphicsMagick-CVE-2012-3438.patch b/GraphicsMagick-CVE-2012-3438.patch deleted file mode 100644 index bacf70e..0000000 --- a/GraphicsMagick-CVE-2012-3438.patch +++ /dev/null @@ -1,65 +0,0 @@ - -# HG changeset patch -# User Glenn Randers-Pehrson -# Date 1343491548 18000 -# Node ID d6e469d02cd260b6531e86a8a6c8a5a2b9ff51cb -# Parent fe9e2eb655ce8b85abfd9b88d20a8a1648ad71e7 -coders/png.c: Some typecasts were inconsistent with libpng-1.4 and later. - -diff -r fe9e2eb655ce -r d6e469d02cd2 coders/png.c ---- a/coders/png.c Thu Jul 26 20:24:26 2012 -0500 -+++ b/coders/png.c Sat Jul 28 11:05:48 2012 -0500 -@@ -1360,7 +1360,11 @@ - } - - #ifdef PNG_USER_MEM_SUPPORTED --static png_voidp png_IM_malloc(png_structp png_ptr,png_uint_32 size) -+#if PNG_LIBPNG_VER >= 14000 -+static png_voidp png_IM_malloc(png_structp png_ptr,png_alloc_size_t size) -+#else -+static png_voidp png_IM_malloc(png_structp png_ptr,png_size_t size) -+#endif - { - (void) png_ptr; - return MagickAllocateMemory(png_voidp,(size_t) size); -@@ -6169,12 +6173,22 @@ - (void) printf("writing raw profile: type=%.1024s, length=%lu\n", - profile_type, (unsigned long)length); - } -- text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text)); -+#if PNG_LIBPNG_VER >= 14000 -+ text=(png_textp) png_malloc(ping,(png_alloc_size_t) sizeof(png_text)); -+#else -+ text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); -+#endif - description_length=strlen((const char *) profile_description); - allocated_length=(png_uint_32) (length*2 + (length >> 5) + 20 - + description_length); -- text[0].text=(png_charp) png_malloc(ping,allocated_length); -- text[0].key=(png_charp) png_malloc(ping, (png_uint_32) 80); -+#if PNG_LIBPNG_VER >= 14000 -+ text[0].text=(png_charp) png_malloc(ping, -+ (png_alloc_size_t) allocated_length); -+ text[0].key=(png_charp) png_malloc(ping, (png_alloc_size_t) 80); -+#else -+ text[0].text=(png_charp) png_malloc(ping, (png_size_t) allocated_length); -+ text[0].key=(png_charp) png_malloc(ping, (png_size_t) 80); -+#endif - text[0].key[0]='\0'; - (void) strcat(text[0].key, "Raw profile type "); - (void) strncat(text[0].key, (const char *) profile_type, 61); -@@ -7620,7 +7634,12 @@ - - if (*attribute->key == '[') - continue; -- text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text)); -+#if PNG_LIBPNG_VER >= 14000 -+ text=(png_textp) png_malloc(ping, -+ (png_alloc_size_t) sizeof(png_text)); -+#else -+ text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); -+#endif - text[0].key=attribute->key; - text[0].text=attribute->value; - text[0].text_length=strlen(attribute->value); - diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 49f82eb..6087977 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -1,6 +1,6 @@ %if 0%{?fedora} > 15 || 0%{?rhel} > 6 -%global quantum_depth 16 +%global _with_quantum_depth --with-quantum-depth=16 %endif %if 0%{?fedora} > 16 @@ -9,10 +9,16 @@ %global lcms lcms %endif +%if 0%{?fedora} > 18 +%global _enable_quantum_library_names --enable-quantum-library-names +%global libQ -Q16 +%endif + Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick -Version: 1.3.16 -Release: 5%{?dist} +Version: 1.3.17 +Release: 1%{?dist} + License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.xz @@ -26,9 +32,6 @@ Patch1: GraphicsMagick-1.3.16-multilib.patch Patch50: GraphicsMagick-1.3.14-perl_linkage.patch ## upstream patches -# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-3438 -# http://graphicsmagick.hg.sourceforge.net/hgweb/graphicsmagick/graphicsmagick/rev/d6e469d02cd2 -Patch100: GraphicsMagick-CVE-2012-3438.patch BuildRequires: bzip2-devel BuildRequires: freetype-devel @@ -119,7 +122,6 @@ however. %patch1 -p1 -b .multilib %patch50 -p1 -b .perl_linkage -%patch100 -p1 -b .CVE-2012-3438 iconv -f iso-8859-2 -t utf8 < ChangeLog > ChangeLog.utf8 mv -f ChangeLog.utf8 ChangeLog @@ -139,7 +141,8 @@ sed -i -e "s|BrowseDelegateDefault=.*|BrowseDelegateDefault=\'xdg-open\'|" confi --with-modules \ --with-perl \ --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix}" \ - %{?quantum_depth:--with-quantum-depth=%{quantum_depth}} \ + %{?_with_quantum_depth} \ + %{?_enable_quantum_library_names} \ --with-threads \ --with-wmf \ --with-x \ @@ -229,8 +232,8 @@ rm -rf %{buildroot} %doc Copyright.txt %doc README.txt %doc %{_datadir}/doc/%{name}/ -%{_libdir}/libGraphicsMagick.so.3* -%{_libdir}/libGraphicsMagickWand.so.2* +%{_libdir}/libGraphicsMagick%{?libQ}.so.3* +%{_libdir}/libGraphicsMagickWand%{?libQ}.so.2* %{_bindir}/[a-z]* %{_libdir}/GraphicsMagick* %{_datadir}/GraphicsMagick* @@ -255,7 +258,7 @@ rm -rf %{buildroot} %files c++ %defattr(-,root,root,-) -%{_libdir}/libGraphicsMagick++.so.3* +%{_libdir}/libGraphicsMagick++%{?libQ}.so.3* %files c++-devel %defattr(-,root,root,-) @@ -273,6 +276,11 @@ rm -rf %{buildroot} %changelog +* Tue Oct 16 2012 Rex Dieter - 1.3.17-1 +- GraphicsMagick-1.3.17 (#866377) +- GraphicsMagick 1.3.13 update breaks some PNGs (#788246) +- --enable-quantum-library-names on f19+ + * Mon Aug 20 2012 Rex Dieter 1.3.16-5 - CVE-2012-3438 GraphicsMagick: png_IM_malloc() size argument (#844106, #844107) diff --git a/sources b/sources index 1200631..968f249 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -41005968939a3d3e92a0728ea2a48e88 GraphicsMagick-1.3.16.tar.xz +d0ee66a320e843a6bf69b57ce17a6be2 GraphicsMagick-1.3.17.tar.xz