From ca40b086c6b3f6cc9b7e2ec997b5ecae3cfccac3 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 11 Jun 2018 20:19:49 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8828 --- MagickCore/draw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) -- 2.40.0