From 1e74843153adb3194e2afe2413e01a773e1f7cb5 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 23 Feb 2017 18:49:01 -0500 Subject: [PATCH] https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31377 --- MagickCore/cache.c | 2 +- MagickCore/statistic.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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; -- 2.50.1