From: Cristy Date: Tue, 12 Jun 2018 00:19:49 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8828 X-Git-Tag: 7.0.8-0~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca40b086c6b3f6cc9b7e2ec997b5ecae3cfccac3;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8828 --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index d5eafd812..338b04285 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -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)