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

Detect excessive entities expansion upon replacement

If entities expansion in the XML parser is asked for,
it is possble to craft relatively small input document leading
to excessive on-the-fly content generation.
This patch accounts for those replacement and stop parsing
after a given threshold. it can be bypassed as usual with the
HUGE parser option.
This commit is contained in:
Daniel Veillard
2013-02-19 10:21:49 +08:00
parent bf058dce13
commit 23f05e0c33
3 changed files with 41 additions and 6 deletions

View File

@@ -310,6 +310,7 @@ struct _xmlParserCtxt {
xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
int input_id; /* we need to label inputs */
unsigned long sizeentcopy; /* volume of entity copy */
};
/**