From: Cristy Date: Mon, 6 May 2019 22:24:06 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14610 X-Git-Tag: 7.0.8-45~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=610a8f4381034eec0af4d74aadac0bfa687b5295;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14610 --- diff --git a/MagickCore/xml-tree.c b/MagickCore/xml-tree.c index 1abeeb4f0..4edfb9011 100644 --- a/MagickCore/xml-tree.c +++ b/MagickCore/xml-tree.c @@ -1731,6 +1731,8 @@ static MagickBooleanType ParseInternalDoctype(XMLTreeRoot *root,char *xml, if ((isalpha((int) ((unsigned char) *n)) == 0) && (*n != '_')) break; xml=n+strcspn(n,XMLWhitespace); + if (*xml == '\0') + break; *xml=';'; v=xml+strspn(xml+1,XMLWhitespace)+1; q=(*v);