]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13023
authorCristy <mikayla-grace@urban-warrior.org>
Sun, 10 Feb 2019 13:16:05 +0000 (08:16 -0500)
committerCristy <mikayla-grace@urban-warrior.org>
Sun, 10 Feb 2019 13:16:24 +0000 (08:16 -0500)
coders/mpc.c

index 6ef4bf899285e318a6726facd9ab6806b1d35d59..5ebea0645cef81dfefff59b9f30fc7f68875ded5 100644 (file)
@@ -782,13 +782,14 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
     /*
       Verify that required image information is defined.
     */
-    if ((LocaleCompare(id,"MagickCache") != 0) || (image->depth > 128) ||
+    if ((LocaleCompare(id,"MagickCache") != 0) ||
         (image->storage_class == UndefinedClass) ||
         (image->compression == UndefinedCompression) ||
         (image->columns == 0) || (image->rows == 0) ||
         (image->number_channels > MaxPixelChannels) ||
         (image->number_meta_channels > (MaxPixelChannels-8)) ||
-        ((image->number_channels+image->number_meta_channels) >= MaxPixelChannels))
+        ((image->number_channels+image->number_meta_channels) >= MaxPixelChannels) ||
+        (image->depth == 0) || (image->depth > 64))
       {
         if (profiles != (LinkedListInfo *) NULL)
           profiles=DestroyLinkedList(profiles,RelinquishMagickMemory);