Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 239e25f

Browse files
committed
parser: Report at least one fatal error
1 parent d470ded commit 239e25f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

parserInternals.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ xmlCtxtVErr(xmlParserCtxtPtr ctxt, xmlNodePtr node, xmlErrorDomain domain,
256256
goto done;
257257
ctxt->nbWarnings += 1;
258258
} else {
259-
if (ctxt->nbErrors >= XML_MAX_ERRORS)
259+
/* Report at least one fatal error. */
260+
if ((ctxt->nbErrors >= XML_MAX_ERRORS) &&
261+
((level < XML_ERR_FATAL) || (ctxt->wellFormed == 0)))
260262
goto done;
261263
ctxt->nbErrors += 1;
262264
}

0 commit comments

Comments
 (0)