]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8828
authorCristy <urban-warrior@imagemagick.org>
Tue, 12 Jun 2018 00:19:49 +0000 (20:19 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 12 Jun 2018 00:19:49 +0000 (20:19 -0400)
MagickCore/draw.c

index d5eafd812e937ac1441b78b93e7c03639cff0e6c..338b04285dd8c949658143bbb0e53bc008e9c8c6 100644 (file)
@@ -2298,6 +2298,17 @@ static SplayTreeInfo *GetMVGMacros(const char *primitive)
             for (p=q; *q != '\0'; )
             {
               GetNextToken(p,&p,extent,token);
+              if (*token == '\0')
+                break;
+              if (*token == '#')
+                {
+                  /*
+                    Skip comment.
+                  */
+                  while ((*p != '\n') && (*p != '\0'))
+                    p++;
+                  continue;
+                }
               if (LocaleCompare(token,"pop") == 0)
                 n--;
               if (LocaleCompare(token,"push") == 0)