diff --git a/src/tests/fuzz/options.c b/src/tests/fuzz/options.c index 937c2f2b..a4e4b9b9 100644 --- a/src/tests/fuzz/options.c +++ b/src/tests/fuzz/options.c @@ -18,6 +18,9 @@ int main() while (__AFL_LOOP(100000)) { size_t len = __AFL_FUZZ_TESTCASE_LEN; + if (!len) + continue; + buf[len - 1] = '\0'; // ensure proper null termination pl_options_load(opts, (const char *) buf); pl_options_save(opts);