Dirk Mueller
5d746e836d
- Fix build with libxml2 2.9.12 that removes maxParserDepth XPath limit - Add upstream patches: * libxslt-Stop-using-maxParserDepth-XPath-limit.patch * libxslt-Do-not-set-maxDepth-in-XPath-contexts.patch OBS-URL: https://build.opensuse.org/request/show/896723 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxslt?expand=0&rev=84
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
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
|
|
|