From a91d9533ddf00d754ccdc092c1bf3df0931788ce Mon Sep 17 00:00:00 2001 From: Addison Crump Date: Sat, 15 Jul 2023 16:00:21 +0200 Subject: [PATCH] institute sane limits for arbitrary-based fuzzers --- fuzz/ast-fuzzers.options | 2 ++ fuzz/oss-fuzz-build.sh | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 fuzz/ast-fuzzers.options diff --git a/fuzz/ast-fuzzers.options b/fuzz/ast-fuzzers.options new file mode 100644 index 000000000..678d526b1 --- /dev/null +++ b/fuzz/ast-fuzzers.options @@ -0,0 +1,2 @@ +[libfuzzer] +max_len = 65536 diff --git a/fuzz/oss-fuzz-build.sh b/fuzz/oss-fuzz-build.sh index f96474739..81f619dcb 100755 --- a/fuzz/oss-fuzz-build.sh +++ b/fuzz/oss-fuzz-build.sh @@ -14,5 +14,8 @@ targets=( ast_fuzz_match_bytes ) for target in "${targets[@]}"; do - cp fuzz/target/x86_64-unknown-linux-gnu/release/$target $OUT/ + cp "fuzz/target/x86_64-unknown-linux-gnu/release/${target}" "${OUT}/" + if [[ "$target" == ast_* ]]; then + cp fuzz/ast-fuzzers.options "${OUT}/${target}.options" + fi done