From: Cristy Date: Mon, 18 Sep 2017 19:30:11 +0000 (-0400) Subject: Unbounded unique colors is problematic X-Git-Tag: 7.0.7-4~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39e82e9ee6d6dd1a227d416411c0197c489e18a6;p=imagemagick Unbounded unique colors is problematic --- diff --git a/coders/histogram.c b/coders/histogram.c index 21c76d7c2..2ff1775df 100644 --- a/coders/histogram.c +++ b/coders/histogram.c @@ -331,7 +331,8 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info, } histogram=(PixelInfo *) RelinquishMagickMemory(histogram); option=GetImageOption(image_info,"histogram:unique-colors"); - if ((option == (const char *) NULL) || (IsStringTrue(option) != MagickFalse)) + if ((IsHistogramImage(image,exception) != MagickFalse) || + (IsStringTrue(option) != MagickFalse)) { FILE *file;