From: Cristy Date: Sat, 3 Mar 2018 01:33:49 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6681 X-Git-Tag: 7.0.7-25~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63829d17deb2a27490fc9f470ddf755bca3855f2;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6681 --- diff --git a/coders/mpc.c b/coders/mpc.c index ee95e6f84..97d33c6d1 100644 --- a/coders/mpc.c +++ b/coders/mpc.c @@ -784,7 +784,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) (image->compression == UndefinedCompression) || (image->columns == 0) || (image->rows == 0) || (image->number_channels > MaxPixelChannels) || - (image->number_meta_channels > MaxPixelChannels) || + (image->number_meta_channels > (MaxPixelChannels-8)) || ((image->number_channels+image->number_meta_channels) >= MaxPixelChannels)) { if (profiles != (LinkedListInfo *) NULL)