From 3740894ffaf4ac151f4d1675169deabfdbb46aa2 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 10 Feb 2019 08:16:05 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13023 --- coders/mpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coders/mpc.c b/coders/mpc.c index 6ef4bf899..5ebea0645 100644 --- a/coders/mpc.c +++ b/coders/mpc.c @@ -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); -- 2.40.0