]> granicus.if.org Git - imagemagick/commitdiff
Unit tests pass again
authorCristy <urban-warrior@imagemagick.org>
Tue, 20 Mar 2018 00:20:11 +0000 (20:20 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 20 Mar 2018 00:20:11 +0000 (20:20 -0400)
coders/pcx.c

index e56afd134e563c40a10de793f80d29c61d912fd5..8805658741b94b2e617dc5165691681746004d82 100644 (file)
@@ -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));