From 39e82e9ee6d6dd1a227d416411c0197c489e18a6 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 18 Sep 2017 15:30:11 -0400 Subject: [PATCH] Unbounded unique colors is problematic --- coders/histogram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.40.0