diff --git a/fuzzing/broker/broker_fuzz_test_config.cpp b/fuzzing/broker/broker_fuzz_test_config.cpp index c8ea405f95..baa7182940 100644 --- a/fuzzing/broker/broker_fuzz_test_config.cpp +++ b/fuzzing/broker/broker_fuzz_test_config.cpp @@ -23,6 +23,8 @@ SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause #include #include +#include "broker_fuzz.h" + /* * Broker check of config only, the config isn't used */ @@ -55,6 +57,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) char filename[100]; FILE *fptr; + if(size < kMinInputLength){ + return 0; + } + umask(0077); snprintf(filename, sizeof(filename), "/tmp/mosquitto_%d.conf", getpid());