From: Cristy Date: Tue, 20 Mar 2018 00:20:11 +0000 (-0400) Subject: Unit tests pass again X-Git-Tag: 7.0.7-28~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89f10ff11480381946eab8e65616e1a96be29630;p=imagemagick Unit tests pass again --- diff --git a/coders/pcx.c b/coders/pcx.c index e56afd134..880565874 100644 --- a/coders/pcx.c +++ b/coders/pcx.c @@ -405,7 +405,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) if ((size_t) (pcx_info.bits_per_pixel*pcx_info.planes*image->columns) > (pcx_packets*8U)) ThrowPCXException(CorruptImageError,"ImproperImageHeader"); - if ((MagickSizeType) pcx_packets > GetBlobSize(image)) + if ((MagickSizeType) (pcx_packets/8) > GetBlobSize(image)) ThrowPCXException(CorruptImageError,"ImproperImageHeader"); scanline=(unsigned char *) AcquireQuantumMemory(MagickMax(image->columns, pcx_info.bytes_per_line),MagickMax(8,pcx_info.planes)*sizeof(*scanline));