Commit 01ea9c5a authored by Nick Wellnhofer's avatar Nick Wellnhofer
Browse files

Fix another code path in xmlParseQName

Check for buffer errors in another code path missed in the previous

Found by OSS-Fuzz.
parent 5ccac8ce
......@@ -8728,9 +8728,11 @@ xmlParseQName(xmlParserCtxtPtr ctxt, const xmlChar **prefix) {
xmlNsErr(ctxt, XML_NS_ERR_QNAME,
"Failed to parse QName '%s:'\n", p, NULL, NULL);
l = xmlParseNmtoken(ctxt);
if (l == NULL)
if (l == NULL) {
if (ctxt->instate == XML_PARSER_EOF)
tmp = xmlBuildQName(BAD_CAST "", p, NULL, 0);
else {
} else {
tmp = xmlBuildQName(l, p, NULL, 0);
xmlFree((char *)l);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment