From: Cristy Date: Mon, 5 Feb 2018 12:18:44 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6014 X-Git-Tag: 7.0.7-23~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0277f16430b0aa108b602b88bfc01c550c9ef1ae;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6014 --- diff --git a/MagickCore/xml-tree.c b/MagickCore/xml-tree.c index 7718c2910..245af83ac 100644 --- a/MagickCore/xml-tree.c +++ b/MagickCore/xml-tree.c @@ -1534,6 +1534,8 @@ static char *ParseEntities(char *xml,char **entities,int state) (void) CopyMagickMemory(xml,xml+i,strlen(xml+i)+1); while ((*xml != '\0') && (*xml != ' ')) xml++; + if (*xml == '\0') + break; } xml--; if ((xml >= p) && (*xml == ' '))