From: Cristy Date: Thu, 29 Nov 2018 16:59:00 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1377 X-Git-Tag: 7.0.8-15~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f648e7f07d14bd911f31d67264120dbfc6f0f350;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1377 --- diff --git a/coders/pcx.c b/coders/pcx.c index c6656515e..4d71e161b 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/13) > GetBlobSize(image)) + if ((MagickSizeType) (pcx_packets/32+128) > GetBlobSize(image)) ThrowPCXException(CorruptImageError,"ImproperImageHeader"); scanline=(unsigned char *) AcquireQuantumMemory(MagickMax(image->columns, pcx_info.bytes_per_line),MagickMax(pcx_info.planes,8)*sizeof(*scanline));