summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2019-04-25 14:29:11 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2019-04-25 14:29:11 +0200
commitd3ec60600c736d0cca002d83022e38febda7ffbf (patch)
tree3b598aff29f6f0469af06b718cf6be2ac47c3f06 /tests
parentc75b811de0afeea6acf19c99a755b8e1c0585aa9 (diff)
downloadlibxslt-d3ec60600c736d0cca002d83022e38febda7ffbf.tar.gz
Optional operation limit
Useful to avoid timeouts when fuzzing.
Diffstat (limited to 'tests')
-rw-r--r--tests/fuzz/xslt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/fuzz/xslt.c b/tests/fuzz/xslt.c
index 0520550d..0d7bfebf 100644
--- a/tests/fuzz/xslt.c
+++ b/tests/fuzz/xslt.c
@@ -124,6 +124,7 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
ctxt = xsltNewTransformContext(sheet, doc);
xsltSetCtxtSecurityPrefs(sec, ctxt);
ctxt->maxTemplateDepth = 100;
+ ctxt->opLimit = 200000;
xsltSetXPathResourceLimits(ctxt->xpathCtxt);
ctxt->xpathCtxt->opCount = sheet->xpathCtxt->opCount;