File GraphicsMagick-CVE-2015-8896.patch of Package GraphicsMagick.6323
Index: GraphicsMagick-1.3.20/coders/pict.c
===================================================================
--- GraphicsMagick-1.3.20.orig/coders/pict.c 2013-03-10 00:19:31.000000000 +0100
+++ GraphicsMagick-1.3.20/coders/pict.c 2016-06-09 11:15:51.856406765 +0200
@@ -1489,11 +1489,11 @@ static unsigned int WritePICTImage(const
unsigned long
bytes_per_line,
+ row_bytes,
storage_class;
unsigned short
base_address,
- row_bytes,
transfer_mode;
/*
@@ -1521,7 +1521,7 @@ static unsigned int WritePICTImage(const
source_rectangle=size_rectangle;
destination_rectangle=size_rectangle;
base_address=0xff;
- row_bytes=(unsigned short) (image->columns | 0x8000);
+ row_bytes=image->columns;
bounds.top=0;
bounds.left=0;
bounds.bottom=(short) image->rows;
@@ -1549,7 +1549,7 @@ static unsigned int WritePICTImage(const
pixmap.bits_per_pixel=32;
pixmap.pack_type=0x04;
transfer_mode=0x40;
- row_bytes=(unsigned short) ((4*image->columns) | 0x8000);
+ row_bytes=4*image->columns;
}
/*
Allocate memory.