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

parser: Allow recovery in xmlParseInNodeContext

Should fix #645.
This commit is contained in:
Nick Wellnhofer 2023-12-13 23:56:19 +01:00
parent 023aecc474
commit 1c106edf2b

View File

@ -13135,13 +13135,11 @@ xmlParseInNodeContext(xmlNodePtr node, const char *data, int datalen,
ctxt->wellFormed = 0;
}
if (!ctxt->wellFormed) {
if (ctxt->errNo == 0)
ret = XML_ERR_INTERNAL_ERROR;
else
ret = (xmlParserErrors)ctxt->errNo;
} else {
if ((ctxt->wellFormed) ||
((ctxt->recovery) && (ctxt->errNo != XML_ERR_NO_MEMORY))) {
ret = XML_ERR_OK;
} else {
ret = (xmlParserErrors) ctxt->errNo;
}
/*