diff --git a/src/fuzz/fuzz-bootspec.c b/src/fuzz/fuzz-bootspec.c index b59e67c24e3..fa9e3f06e04 100644 --- a/src/fuzz/fuzz-bootspec.c +++ b/src/fuzz/fuzz-bootspec.c @@ -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); diff --git a/src/fuzz/fuzz-bootspec.options b/src/fuzz/fuzz-bootspec.options new file mode 100644 index 00000000000..0824b19fab4 --- /dev/null +++ b/src/fuzz/fuzz-bootspec.options @@ -0,0 +1,2 @@ +[libfuzzer] +max_len = 65535