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

parser: Don't overwrite error state in xmlParseTextDecl

Fixes a null deref in xmlLoadEntityContent found by OSS-Fuzz.
This commit is contained in:
Nick Wellnhofer 2023-11-15 12:10:25 +01:00
parent da703eaaea
commit 529df19619

View File

@ -7133,11 +7133,10 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
if (c == '>')
break;
}
if (ctxt->instate == XML_PARSER_EOF)
return;
}
ctxt->instate = oldstate;
if (ctxt->instate != XML_PARSER_EOF)
ctxt->instate = oldstate;
}
/**