1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

error: Limit number of parser errors

Reporting errors is expensive and some abusive test cases can generate
an error for each invalid input byte. This causes the parser to spend
most of the time with error handling. Limit the number of errors and
warnings to 100.
This commit is contained in:
Nick Wellnhofer
2022-12-27 14:15:51 +01:00
parent ba910d344f
commit 59b3366178
5 changed files with 44 additions and 6 deletions

View File

@@ -310,6 +310,8 @@ struct _xmlParserCtxt {
unsigned long sizeentcopy; /* volume of entity copy */
int endCheckState; /* quote state for push parser */
unsigned short nbErrors; /* number of errors */
unsigned short nbWarnings; /* number of warnings */
};
/**