From 589a6947fa5e6f6f1d3f340053a8c92fa8b9f445 Mon Sep 17 00:00:00 2001 From: Sudhakar Verma <10460978+sudhackar@users.noreply.github.com> Date: Sun, 5 Oct 2025 09:20:42 +0530 Subject: [PATCH] jq_fuzz_execute: limit oniguruma depth to 1024 (#3377) Fixes #3375 - I'll also fix the oss-fuzz build for this in a PR Signed-off-by: Sudhakar Verma --- tests/jq_fuzz_execute.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/jq_fuzz_execute.cpp b/tests/jq_fuzz_execute.cpp index fafebdb9..7d12af9a 100644 --- a/tests/jq_fuzz_execute.cpp +++ b/tests/jq_fuzz_execute.cpp @@ -3,6 +3,12 @@ #include "jq.h" #include "jv.h" +#include "oniguruma.h" + +extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { + onig_set_parse_depth_limit(1024); + return 0; +} // Fuzzer inspired by /src/jq_test.c // The goal is to have the fuzzer execute the functions: