summaryrefslogtreecommitdiff
path: root/xmllint.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2008-08-26 13:05:34 +0000
committerDaniel Veillard <veillard@src.gnome.org>2008-08-26 13:05:34 +0000
commit8915c150b5630178b0f9e83f0d911090095b58a1 (patch)
tree9c2c056117eca91a70f1c05a83be6e471e87bade /xmllint.c
parentbf9c1dad3a7d17f9207756a5b0e3a3efdba34c1b (diff)
downloadlibxml2-8915c150b5630178b0f9e83f0d911090095b58a1.tar.gz
strengthen some of the internal parser limits, add an XML_PARSE_HUGE
* include/libxml/parser.h parser.c xmllint.c: strengthen some of the internal parser limits, add an XML_PARSE_HUGE option to bypass them all. More internal parser limits will still need to be added. Daniel svn path=/trunk/; revision=3777
Diffstat (limited to 'xmllint.c')
-rw-r--r--xmllint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmllint.c b/xmllint.c
index 3a30cc87..6955fde6 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -2833,6 +2833,7 @@ static void usage(const char *name) {
printf("\t--copy : used to test the internal copy implementation\n");
#endif /* LIBXML_TREE_ENABLED */
printf("\t--recover : output what was parsable on broken XML documents\n");
+ printf("\t--huge : remove any internal arbitrary parser limits\n");
printf("\t--noent : substitute entity references by their value\n");
printf("\t--noout : don't output the result tree\n");
printf("\t--path 'paths': provide a set of paths for resources\n");
@@ -2972,6 +2973,9 @@ main(int argc, char **argv) {
(!strcmp(argv[i], "--recover"))) {
recovery++;
options |= XML_PARSE_RECOVER;
+ } else if ((!strcmp(argv[i], "-huge")) ||
+ (!strcmp(argv[i], "--huge"))) {
+ options |= XML_PARSE_HUGE;
} else if ((!strcmp(argv[i], "-noent")) ||
(!strcmp(argv[i], "--noent"))) {
noent++;