Blame SOURCES/ImageMagick-pict-doublefree.patch

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