File GraphicsMagick-1.2.5-CVE-2008-1097.patch of Package GraphicsMagick
--- coders/pcx.c
+++ coders/pcx.c
@@ -303,6 +303,9 @@
image->columns=(pcx_info.right-pcx_info.left)+1;
image->rows=(pcx_info.bottom-pcx_info.top)+1;
image->depth=pcx_info.bits_per_pixel <= 8 ? 8 : QuantumDepth;
+ if ((image->columns == 0) || (image->rows == 0) ||
+ (pcx_info.bits_per_pixel == 0))
+ ThrowReaderException(CorruptImageError,CorruptImage,image);
image->units=PixelsPerInchResolution;
image->x_resolution=pcx_info.horizontal_resolution;
image->y_resolution=pcx_info.vertical_resolution;