]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6641
authorCristy <urban-warrior@imagemagick.org>
Fri, 2 Mar 2018 01:26:15 +0000 (20:26 -0500)
committerCristy <urban-warrior@imagemagick.org>
Fri, 2 Mar 2018 01:26:15 +0000 (20:26 -0500)
coders/rle.c

index 1a2e02a63d4c16aadf2af3fd645e6c1020a4254c..866d315ce45ac18d5dd519661b240cbdbe3227cc 100644 (file)
@@ -243,6 +243,8 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
     if ((number_planes == 0) || (number_planes == 2) || ((flags & 0x04) &&
         ((number_planes <= 2) || number_planes > 254)) || (bits_per_pixel != 8))
       ThrowRLEException(CorruptImageError,"ImproperImageHeader");
+    if (number_planes > 4)
+      ThrowRLEException(CorruptImageError,"ImproperImageHeader");
     if ((image->columns == 0) || (image->columns >= 32768) ||
         (image->rows == 0) || (image->rows >= 32768))
       ThrowRLEException(CorruptImageError,"ImproperImageHeader");