fuzz: limit the size of the input

To avoid timeouts in oss-fuzz. The timeout reported in #29736 happened
with a ~500K test case, so with a conservative 128K limit we should
still be well within a range for any reasonable-ish generated input to
get through, while avoiding timeouts.

Resolves: #29736
This commit is contained in:
Frantisek Sumsal
2023-11-01 23:08:19 +00:00
committed by Luca Boccassi
parent 43fe529e0f
commit d0404391e5
+3
View File
@@ -75,6 +75,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_fdset_free_ FDSet *fdset = NULL;
if (outside_size_range(size, 0, 128 * 1024))
return 0;
fuzz_setup_logging();
assert_se(fdset = fdset_new());