From: Cristy Date: Mon, 31 Oct 2016 00:30:48 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/293 X-Git-Tag: 7.0.3-6~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b34848cfba832366937eb32ab628a3a7512ab84;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/293 --- 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)) {