File ImageMagick-6.2.5-CVE-2008-1097.patch of Package ImageMagick
--- coders/pcx.c
+++ coders/pcx.c
@@ -316,6 +316,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,"ImproperImageHeader");
image->units=PixelsPerInchResolution;
image->x_resolution=pcx_info.horizontal_resolution;
image->y_resolution=pcx_info.vertical_resolution;