From 5b34848cfba832366937eb32ab628a3a7512ab84 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 30 Oct 2016 20:30:48 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/293 --- coders/xpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/xpm.c b/coders/xpm.c index 7d9021c37..088303da8 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -336,7 +336,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception) if (count == 4) break; } - if ((count != 4) || (width == 0) || (width > 2) || + if ((count != 4) || (width == 0) || (width > 3) || (image->columns == 0) || (image->rows == 0) || (image->colors == 0) || (image->colors > MaxColormapSize)) { -- 2.40.0