From b7b7ba30cbe5eab4289fb080a88eff446935e49a Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 19 Mar 2018 19:25:44 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7016 --- coders/wpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/wpg.c b/coders/wpg.c index b91848154..d453f6f6a 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -1210,7 +1210,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info, sizeof(*image->colormap)); } - if (bpp == 1) + if ((bpp == 1) && (image->colors > 1)) { if(image->colormap[0].red==0 && image->colormap[0].green==0 && -- 2.40.0