diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-08-20 15:57:23 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-08-20 15:45:15 +0200 |
commit | fa2547fc52b90b4bbde250803df24d7f665383a7 (patch) | |
tree | a5d17a735ea56bcc7aa16a0d1059643d4b8d08f6 /src/test/fuzz | |
parent | 192a959b65660ffacedb5a5eb2a0d26736c636d7 (diff) |
fuzz: Avoid timeout in blockfilter fuzz target
Diffstat (limited to 'src/test/fuzz')
-rw-r--r-- | src/test/fuzz/blockfilter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/fuzz/blockfilter.cpp b/src/test/fuzz/blockfilter.cpp index 7fa06085f8..96f049625d 100644 --- a/src/test/fuzz/blockfilter.cpp +++ b/src/test/fuzz/blockfilter.cpp @@ -36,9 +36,10 @@ FUZZ_TARGET(blockfilter) (void)gcs_filter.GetEncoded(); (void)gcs_filter.Match(ConsumeRandomLengthByteVector(fuzzed_data_provider)); GCSFilter::ElementSet element_set; - while (fuzzed_data_provider.ConsumeBool()) { + LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 30000) + { element_set.insert(ConsumeRandomLengthByteVector(fuzzed_data_provider)); - gcs_filter.MatchAny(element_set); } + gcs_filter.MatchAny(element_set); } } |