From f648e7f07d14bd911f31d67264120dbfc6f0f350 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 29 Nov 2018 11:59:00 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1377 --- coders/pcx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.40.0