From cdc5f71f66d60d07028d48061ecb88e05f712822 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:25:21 -0700 Subject: [PATCH] test(fuzz): Fix an off-by-one error affecting corpus entries of the exact maximum length --- build-fuzz-corpus-multiple-sizes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-fuzz-corpus-multiple-sizes.sh b/build-fuzz-corpus-multiple-sizes.sh index 1ba823c0..bed95a23 100755 --- a/build-fuzz-corpus-multiple-sizes.sh +++ b/build-fuzz-corpus-multiple-sizes.sh @@ -10,7 +10,7 @@ for size in "${@:2}"; do rm -rf "fuzz/corpus/fuzz_$1_pre_fresh_blood" || true find "fuzz/corpus/fuzz_$1" -type f -exec mv '{}' "fuzz/corpus/fuzz_$1_recombination_sources" ';' || true ./build-fuzz-corpus-multiple-restarts.sh "$1" "$size" - find "fuzz/corpus/fuzz_$1_recombination_sources" -type f -size "-${size}c" -exec mv '{}' "fuzz/corpus/fuzz_$1" ';' + find "fuzz/corpus/fuzz_$1_recombination_sources" -type f -size "-$((size + 1))c" -exec mv '{}' "fuzz/corpus/fuzz_$1" ';' ./fuzz-until-converged.sh "$1" "$size" done echo "$(date): FINISHED" \ No newline at end of file