]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6727
authorCristy <urban-warrior@imagemagick.org>
Sun, 4 Mar 2018 15:00:40 +0000 (10:00 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 4 Mar 2018 15:00:40 +0000 (10:00 -0500)
MagickCore/statistic.c
configure

index 3fc4f07afc0c069df4e0c7b4b2d846dd41384012..bf81e58e35f91cd20daa32f5d650c086f72fef32 100644 (file)
@@ -2110,14 +2110,11 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image,
         count;
 
       count=area*histogram[GetPixelChannels(image)*j+i];
-      if (number_bins > MagickEpsilon)
-        {
-          channel_statistics[channel].entropy+=-count*MagickLog10(count)/
-            MagickLog10(number_bins);
-          channel_statistics[CompositePixelChannel].entropy+=-count*
-            MagickLog10(count)/MagickLog10(number_bins)/
-            GetPixelChannels(image);
-        }
+      channel_statistics[channel].entropy+=-count*MagickLog10(count)*
+        PerceptibleReciprocal(MagickLog10(number_bins));
+      channel_statistics[CompositePixelChannel].entropy+=-count*
+        MagickLog10(count)*PerceptibleReciprocal(MagickLog10(number_bins))/
+        GetPixelChannels(image);
     }
   }
   histogram=(double *) RelinquishMagickMemory(histogram);
index be58cb5633f19246dc70f3a7a48fbdcf183b1af2..31f3dc8c0e85ab01698cc5103034c75f16b6728a 100755 (executable)
--- a/configure
+++ b/configure
@@ -4550,7 +4550,7 @@ MAGICK_PATCHLEVEL_VERSION=25
 
 MAGICK_VERSION=7.0.7-25
 
-MAGICK_GIT_REVISION=23162:29064ef33:20180303
+MAGICK_GIT_REVISION=23178:009e5556d:20180304
 
 
 # Substitute library versioning