]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5351
authorCristy <urban-warrior@imagemagick.org>
Mon, 5 Feb 2018 19:47:07 +0000 (14:47 -0500)
committerCristy <urban-warrior@imagemagick.org>
Mon, 5 Feb 2018 19:47:07 +0000 (14:47 -0500)
coders/xpm.c

index ca88c1751d49708d4b46f387234c1229ceb2d08e..d710287f70ea90ade35396036713302c31ef5d77 100644 (file)
@@ -379,6 +379,8 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
   {
     p=next;
     next=NextXPMLine(p);
+    if (next == (char *) NULL)
+      break;
     (void) CopyXPMColor(key,p,MagickMin((size_t) width,MagickPathExtent-1));
     status=AddValueToSplayTree(xpm_colors,ConstantString(key),(void *) j);
     /*