1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

fuzz-bootspec: limit input size

https://oss-fuzz.com/testcase-detail/5680508182331392 has the
first timeout with 811kb of input. As in the other cases, the code
is known to be slow with lots of repeated entries and we're fine with
that.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-05-10 11:55:37 +02:00 committed by Yu Watanabe
parent 01c99b29e9
commit 82544241ba
2 changed files with 5 additions and 0 deletions

View File

@ -84,6 +84,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
_cleanup_(boot_config_free) BootConfig config = BOOT_CONFIG_NULL;
int r;
if (size > 65535)
return 0;
/* Disable most logging if not running standalone */
if (!getenv("SYSTEMD_LOG_LEVEL"))
log_set_max_level(LOG_CRIT);

View File

@ -0,0 +1,2 @@
[libfuzzer]
max_len = 65535