mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Fix another code path in xmlParseQName
Check for buffer errors in another code path missed in the previous commit. Found by OSS-Fuzz.
This commit is contained in:
6
parser.c
6
parser.c
@@ -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)
|
||||
return(NULL);
|
||||
tmp = xmlBuildQName(BAD_CAST "", p, NULL, 0);
|
||||
else {
|
||||
} else {
|
||||
tmp = xmlBuildQName(l, p, NULL, 0);
|
||||
xmlFree((char *)l);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user