From 8a2e99960ffc2e32e72b8aaef6c74ef11cd8239f Mon Sep 17 00:00:00 2001 From: Julien Cretin Date: Mon, 28 Feb 2022 12:17:14 +0100 Subject: [PATCH] Reduce maximum fuzz input size The fuzzer timed out (60s) on a 17k input. On my machine it runs for 12s and 7s after truncation to 10k. --- libraries/persistent_store/fuzz/src/store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/persistent_store/fuzz/src/store.rs b/libraries/persistent_store/fuzz/src/store.rs index 9e83587..c5a4686 100644 --- a/libraries/persistent_store/fuzz/src/store.rs +++ b/libraries/persistent_store/fuzz/src/store.rs @@ -38,7 +38,7 @@ pub fn fuzz(mut data: &[u8], debug: bool, stats: Option<&mut Stats>) { // length and timeout after 1 minute. By default, libFuzzer has a maximum length of 4096 bytes. // We use a number between 4096 bytes and 1 minute, ideally such that the proportion of inputs // timing out in oss-fuzz is around 1%. - const MAX_DATA_LEN: usize = 20_000; + const MAX_DATA_LEN: usize = 10_000; if data.len() > MAX_DATA_LEN { data = &data[..MAX_DATA_LEN]; }