From: Cristy Date: Wed, 28 Nov 2018 23:10:01 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1377 X-Git-Tag: 7.0.8-15~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54a848d131235dec055011a1cffb2ee8ef581a3a;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1377 --- diff --git a/coders/pcx.c b/coders/pcx.c index b6177c258..c6656515e 100644 --- a/coders/pcx.c +++ b/coders/pcx.c @@ -408,7 +408,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) pcx_packets=(size_t) pcx_packets*pcx_info.planes; if ((size_t) (pcx_info.bits_per_pixel*pcx_info.planes*image->columns) > (pcx_packets*8U)) ThrowPCXException(CorruptImageError,"ImproperImageHeader"); - if ((MagickSizeType) (pcx_packets/12) > GetBlobSize(image)) + if ((MagickSizeType) (pcx_packets/13) > GetBlobSize(image)) ThrowPCXException(CorruptImageError,"ImproperImageHeader"); scanline=(unsigned char *) AcquireQuantumMemory(MagickMax(image->columns, pcx_info.bytes_per_line),MagickMax(pcx_info.planes,8)*sizeof(*scanline));