components/imagemagick/patches/CVE-2014-2030.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 09 Mar 2015 23:00:55 -0700
changeset 3928 a2a4b4365139
parent 1739 7df663cb65c3
permissions -rw-r--r--
Added tag s12-70 for changeset ea48a1716c18

# 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
           {