Hello community, here is the log from the commit of package libpng16 for openSUSE:Factory checked in at 2013-03-20 09:53:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libpng16 (Old) and /work/SRC/openSUSE:Factory/.libpng16.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libpng16", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/libpng16/libpng16.changes 2013-03-15 10:41:16.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libpng16.new/libpng16.changes 2013-03-20 09:53:25.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Mar 18 11:44:21 UTC 2013 - [email protected] + +- allow zero length PLTE chunks + (fixes GraphicsMagick testsuite) + +------------------------------------------------------------------- New: ---- libpng16-0387-Reenable-code-to-allow-zero-length-PLTE-chunks-for-M.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libpng16.spec ++++++ --- /var/tmp/diff_new_pack.DUiylK/_old 2013-03-20 09:53:26.000000000 +0100 +++ /var/tmp/diff_new_pack.DUiylK/_new 2013-03-20 09:53:26.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libpng16 # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,8 @@ Group: System/Libraries Source: libpng-%{version}.tar.bz2 Source2: baselibs.conf +# will be upstreamed in 1.6.1 +Patch0: libpng16-0387-Reenable-code-to-allow-zero-length-PLTE-chunks-for-M.patch BuildRequires: libtool BuildRequires: pkg-config BuildRequires: zlib-devel @@ -53,7 +55,10 @@ %package devel Summary: Development Tools for applications which will use the Libpng Group: Development/Libraries/C and C++ -Requires: zlib-devel glibc-devel %{libname} = %{version} pkg-config +Requires: %{libname} = %{version} +Requires: glibc-devel +Requires: pkg-config +Requires: zlib-devel Recommends: libpng%{branch}-compat-devel # bug437293 %ifarch ppc64 @@ -93,6 +98,7 @@ %prep %setup -n libpng-%{version} +%patch0 -p1 %build # We'll never use the old pgcc-2.95.1 with the buggy -O3, so having ++++++ libpng16-0387-Reenable-code-to-allow-zero-length-PLTE-chunks-for-M.patch ++++++ http://sourceforge.net/mailarchive/forum.php?thread_name=20130219075910.GK27522%40danbala.tuwien.ac.at&forum_name=png-mng-implement >From 9ee585718b346d32767015152a728106922b49d1 Mon Sep 17 00:00:00 2001 Message-Id: <9ee585718b346d32767015152a728106922b49d1.1361241956.git.jbow...@acm.org> From: John Bowler <[email protected]> Date: Mon, 18 Feb 2013 18:44:14 -0800 Subject: [libpng16] Reenable code to allow zero length PLTE chunks for MNG support. Signed-off-by: John Bowler <[email protected]> --- pngset.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pngset.c b/pngset.c index ac39a44..f89861e 100644 --- a/pngset.c +++ b/pngset.c @@ -514,7 +514,7 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_debug1(1, "in %s storage function", "PLTE"); - if (png_ptr == NULL || info_ptr == NULL || palette == NULL) + if (png_ptr == NULL || info_ptr == NULL) return; if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH) @@ -529,6 +529,17 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, } } + if ((num_palette > 0 && palette == NULL) || + (num_palette == 0 +# ifdef PNG_MNG_FEATURES_SUPPORTED + && (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 +# endif + )) + { + png_chunk_report(png_ptr, "Invalid palette", PNG_CHUNK_ERROR); + return; + } + /* It may not actually be necessary to set png_ptr->palette here; * we do it for backward compatibility with the way the png_handle_tRNS * function used to do the allocation. @@ -545,7 +556,8 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_ptr->palette = png_voidcast(png_colorp, png_calloc(png_ptr, PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)))); - memcpy(png_ptr->palette, palette, num_palette * (sizeof (png_color))); + if (num_palette > 0) + memcpy(png_ptr->palette, palette, num_palette * (sizeof (png_color))); info_ptr->palette = png_ptr->palette; info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; -- 1.8.1.2 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
