aboutsummaryrefslogtreecommitdiffstats
path: root/main/libxslt/Stop-using-maxParserDepth-XPath-limit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/libxslt/Stop-using-maxParserDepth-XPath-limit.patch')
-rw-r--r--main/libxslt/Stop-using-maxParserDepth-XPath-limit.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/main/libxslt/Stop-using-maxParserDepth-XPath-limit.patch b/main/libxslt/Stop-using-maxParserDepth-XPath-limit.patch
new file mode 100644
index 00000000000..ee9c2aad6bc
--- /dev/null
+++ b/main/libxslt/Stop-using-maxParserDepth-XPath-limit.patch
@@ -0,0 +1,37 @@
+From 9ae2f94df1721e002941b40665efb762aefcea1a Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 17 Aug 2020 03:42:11 +0200
+Subject: [PATCH] Stop using maxParserDepth XPath limit
+
+This will be removed again from libxml2.
+---
+ tests/fuzz/fuzz.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/tests/fuzz/fuzz.c b/tests/fuzz/fuzz.c
+index f502ca2c..75234ad6 100644
+--- a/tests/fuzz/fuzz.c
++++ b/tests/fuzz/fuzz.c
+@@ -183,8 +183,7 @@ xsltFuzzXPathInit(int *argc_p ATTRIBUTE_UNUSED, char ***argv_p,
+ xpctxt = tctxt->xpathCtxt;
+
+ /* Resource limits to avoid timeouts and call stack overflows */
+- xpctxt->maxParserDepth = 15;
+- xpctxt->maxDepth = 100;
++ xpctxt->maxDepth = 500;
+ xpctxt->opLimit = 500000;
+
+ /* Test namespaces used in xpath.xml */
+@@ -317,8 +316,7 @@ xsltFuzzXsltInit(int *argc_p ATTRIBUTE_UNUSED, char ***argv_p,
+
+ static void
+ xsltSetXPathResourceLimits(xmlXPathContextPtr ctxt) {
+- ctxt->maxParserDepth = 15;
+- ctxt->maxDepth = 100;
++ ctxt->maxDepth = 200;
+ ctxt->opLimit = 100000;
+ }
+
+--
+GitLab
+