File libpng16-1.6.6-CVE-2013-6954.patch of Package libpng16.4353

http://sourceforge.net/p/libpng/code/ci/1faa6ff32c648acfe3cf30a58d31d7aebc24968c
--- pngrtran.c
+++ pngrtran.c
@@ -1839,6 +1839,9 @@
 
          info_ptr->bit_depth = 8;
          info_ptr->num_trans = 0;
+
+         if (png_ptr->palette == NULL)
+            png_error (png_ptr, "Palette is NULL in indexed image");
       }
       else
       {
--- pngset.c
+++ pngset.c
@@ -528,7 +528,7 @@
 #        endif
       ))
    {
-      png_chunk_report(png_ptr, "Invalid palette", PNG_CHUNK_ERROR);
+      png_error(png_ptr, "Invalid palette");
       return;
    }
 
openSUSE Build Service is sponsored by