mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-28 23:14:57 +03:00
parser: Fail on catastrophic errors in recovery mode
This commit is contained in:
4
parser.c
4
parser.c
@@ -12018,7 +12018,7 @@ xmlCtxtParseContentInternal(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
||||
xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
|
||||
|
||||
if ((ctxt->wellFormed) ||
|
||||
((ctxt->recovery) && (ctxt->errNo != XML_ERR_NO_MEMORY))) {
|
||||
((ctxt->recovery) && (!xmlCtxtIsCatastrophicError(ctxt)))) {
|
||||
if (root != NULL) {
|
||||
xmlNodePtr cur;
|
||||
|
||||
@@ -13836,7 +13836,7 @@ xmlCtxtParseDocument(xmlParserCtxtPtr ctxt, xmlParserInputPtr input)
|
||||
xmlParseDocument(ctxt);
|
||||
|
||||
if ((ctxt->wellFormed) ||
|
||||
((ctxt->recovery) && (ctxt->errNo != XML_ERR_NO_MEMORY))) {
|
||||
((ctxt->recovery) && (!xmlCtxtIsCatastrophicError(ctxt)))) {
|
||||
ret = ctxt->myDoc;
|
||||
} else {
|
||||
if (ctxt->errNo == XML_ERR_OK)
|
||||
|
||||
Reference in New Issue
Block a user