From d0f9c810bc403c9ffa931c001e57664670be931f Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 14 Nov 2014 19:18:19 +0000 Subject: [PATCH] --- MagickCore/statistic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c index e99541711..b7dcefc1d 100644 --- a/MagickCore/statistic.c +++ b/MagickCore/statistic.c @@ -2039,7 +2039,7 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image, assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - histogram=(double *) AcquireQuantumMemory(MaxMap+1UL,GetPixelChannels(image)* + histogram=(double *) AcquireQuantumMemory(MaxMap+1UL,MaxPixelChannels* sizeof(*histogram)); channel_statistics=(ChannelStatistics *) AcquireQuantumMemory( MaxPixelChannels+1,sizeof(*channel_statistics)); @@ -2061,7 +2061,7 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image, channel_statistics[i].maxima=(-MagickMaximumValue); channel_statistics[i].minima=MagickMaximumValue; } - (void) ResetMagickMemory(histogram,0,(MaxMap+1)*GetPixelChannels(image)* + (void) ResetMagickMemory(histogram,0,(MaxMap+1)*MaxPixelChannels* sizeof(*histogram)); for (y=0; y < (ssize_t) image->rows; y++) { -- 2.40.0