Blame SOURCES/ImageMagick-pict-doublefree.patch

e53adb
From 0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734 Mon Sep 17 00:00:00 2001
e53adb
From: cristy <urban-warrior@git.imagemagick.org>
e53adb
Date: Sat, 30 May 2015 00:49:11 +0000
e53adb
Subject: [PATCH]
e53adb
e53adb
diff --git a/coders/pict.c b/coders/pict.c
e53adb
index 4f51eb3..027119d 100644
e53adb
--- a/coders/pict.c
e53adb
+++ b/coders/pict.c
e53adb
@@ -1637,6 +1637,7 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
e53adb
   size_t
e53adb
     bytes_per_line,
e53adb
     count,
e53adb
+    row_bytes,
e53adb
     storage_class;
e53adb
 
e53adb
   ssize_t
e53adb
@@ -1649,7 +1650,6 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
e53adb
 
e53adb
   unsigned short
e53adb
     base_address,
e53adb
-    row_bytes,
e53adb
     transfer_mode;
e53adb
 
e53adb
   /*
e53adb
@@ -1681,7 +1681,7 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
e53adb
   source_rectangle=size_rectangle;
e53adb
   destination_rectangle=size_rectangle;
e53adb
   base_address=0xff;
e53adb
-  row_bytes=(unsigned short) (image->columns | 0x8000);
e53adb
+  row_bytes=image->columns;
e53adb
   bounds.top=0;
e53adb
   bounds.left=0;
e53adb
   bounds.bottom=(short) image->rows;
e53adb
@@ -1711,7 +1711,7 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
e53adb
       pixmap.bits_per_pixel=32;
e53adb
       pixmap.pack_type=0x04;
e53adb
       transfer_mode=0x40;
e53adb
-      row_bytes=(unsigned short) ((4*image->columns) | 0x8000);
e53adb
+      row_bytes=4*image->columns;
e53adb
     }
e53adb
   /*
e53adb
     Allocate memory.
e53adb