]> granicus.if.org Git - imagemagick/commitdiff
Check for width of zero
authorCristy <urban-warrior@imagemagick.org>
Fri, 25 Mar 2016 14:51:46 +0000 (10:51 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 25 Mar 2016 14:51:46 +0000 (10:51 -0400)
coders/xpm.c

index b323d8d944c5fae8f77d5c744f21e4131298ad65..15334ae6879e546145740165dc86a7a2315e1d42 100644 (file)
@@ -336,7 +336,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
     if (count == 4)
       break;
   }
-  if ((count != 4) || (width > 10) || (image->columns == 0) ||
+  if ((count != 4) || (width == 0) || (width > 10) || (image->columns == 0) ||
       (image->rows == 0) || (image->colors == 0))
     ThrowReaderException(CorruptImageError,"ImproperImageHeader");
   /*