components/imagemagick/patches/CVE-2014-2030.patch
author Tomas Klacko <tomas.klacko@oracle.com>
Mon, 16 Mar 2015 02:51:38 -0700
branchs11-update
changeset 3948 568dd7b9cf04
parent 2985 8d0f13e7dd0c
permissions -rw-r--r--
20393612 silence debug info "Reallocating sreaddir buffer from 14 entries to 28 entries"

# This comes from upstream:
# http://trac.imagemagick.org/changeset/13736
# linked from:
# https://bugzilla.redhat.com/show_bug.cgi?id=1064098

--- ImagMagick-6.8.3/coders/psd.c	2014-03-03 07:57:25.334035665 -0800
+++ ImagMagick-6.8.3/coders/psd.c	2014-03-03 08:02:05.371109695 -0800
@@ -2107,9 +2107,6 @@
   StringInfo
     *bim_profile;
 
-  unsigned char
-    layer_name[4];
-
   /*
     Open image file.
   */
@@ -2367,12 +2364,15 @@
         property=(const char *) GetImageProperty(next_image,"label");
         if (property == (const char *) NULL)
           {
+            char
+              layer_name[MaxTextExtent];
+
             (void) WriteBlobMSBLong(image,16);
             (void) WriteBlobMSBLong(image,0);
             (void) WriteBlobMSBLong(image,0);
-            (void) FormatLocaleString((char *) layer_name,MaxTextExtent,
-              "L%06ld",(long) layer_count++);
-            WritePascalString( image, (char*)layer_name, 4 );
+            (void) FormatLocaleString(layer_name,MaxTextExtent,"L%06ld",(long)
+              layer_count++);
+            WritePascalString(image,layer_name,4);
           }
         else
           {