]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1377
authorCristy <urban-warrior@imagemagick.org>
Wed, 28 Nov 2018 23:10:01 +0000 (18:10 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 28 Nov 2018 23:10:01 +0000 (18:10 -0500)
coders/pcx.c

index b6177c2589a562ccf804ce236b1fc7e30acdf892..c6656515e53a928b83af82e2d8ae2b9193517f12 100644 (file)
@@ -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));