mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 12:25:09 +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:
parent
5ccac8cecf
commit
01ea9c5af7
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user