From: Cristy Date: Sat, 20 Apr 2019 19:33:58 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14369 X-Git-Tag: 7.0.8-42~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3652ab98942b53e85e5cf265a3521b3e86b0ec4c;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14369 --- diff --git a/MagickCore/xml-tree.c b/MagickCore/xml-tree.c index ce4a42ebe..3597b826d 100644 --- a/MagickCore/xml-tree.c +++ b/MagickCore/xml-tree.c @@ -1403,6 +1403,8 @@ static char *ParseEntities(char *xml,char **entities,int state) if (*xml == '\n') (void) memmove(xml,xml+1,strlen(xml)); } + if (*xml == '\0') + return(ConstantString(xml)); for (xml=p; ; ) { while ((*xml != '\0') && (*xml != '&') && ((*xml != '%') ||