1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-23 02:50:08 +03:00

parser: Don't overwrite error state in xmlParseTextDecl

If a memory allocation fails, this could cause a null deref after
recent changes.

Found by OSS-Fuzz.
This commit is contained in:
Nick Wellnhofer 2023-10-11 13:25:49 +02:00
parent 821a037038
commit 514ab39955

View File

@ -7131,6 +7131,8 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
if (c == '>')
break;
}
if (ctxt->instate == XML_PARSER_EOF)
return;
}
ctxt->instate = oldstate;