]> granicus.if.org Git - imagemagick/commitdiff
Check for unbalanced quotes
authorCristy <urban-warrior@imagemagick.org>
Sun, 25 Aug 2019 23:58:55 +0000 (19:58 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 25 Aug 2019 23:58:55 +0000 (19:58 -0400)
coders/xpm.c

index 232ff2df274f9358bb3a11db315ca5dcca0ed618..812def9f0e72b3eae0595c12c944ed900d68437a 100644 (file)
@@ -362,6 +362,11 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
       *q++=(*p);
   }
   *q='\0';
+  if (active != MagickFalse)
+    {
+      xpm_buffer=DestroyString(xpm_buffer);
+      ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
+    }
   /*
     Initialize image structure.
   */