Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 74bdc23aeb29a62bae00d025b2b6f2cf > files > 9

ImageMagick-6.2.8.0-4.el5_5.3.src.rpm

--- ImageMagick-6.2.8.orig/coders/pcx.c	2006-01-26 05:31:38.000000000 +1000
+++ ImageMagick-6.2.8/coders/pcx.c	2008-02-07 14:53:01.000000000 +1000
@@ -314,6 +314,9 @@ static Image *ReadPCXImage(const ImageIn
     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;