From: Cristy Date: Thu, 23 Feb 2017 23:49:01 +0000 (-0500) Subject: https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31377 X-Git-Tag: 7.0.5-1~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e74843153adb3194e2afe2413e01a773e1f7cb5;p=imagemagick https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31377 --- diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 6730b5d7a..1e79ede50 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -3461,7 +3461,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode, assert(cache_info->signature == MagickCoreSignature); if ((AcquireMagickResource(WidthResource,image->columns) == MagickFalse) || (AcquireMagickResource(HeightResource,image->rows) == MagickFalse)) - ThrowBinaryException(ResourceLimitError,"WidthOrHeightExceedsLimit", + ThrowBinaryException(IamgeError,"WidthOrHeightExceedsLimit", image->filename); source_info=(*cache_info); source_info.file=(-1); diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c index aab5dd621..5cde9930b 100644 --- a/MagickCore/statistic.c +++ b/MagickCore/statistic.c @@ -1961,6 +1961,8 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image, PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; + if ((traits & UpdatePixelTrait) == 0) + continue; if (channel_statistics[channel].depth != MAGICKCORE_QUANTUM_DEPTH) { depth=channel_statistics[channel].depth;