fuzz: extend fuzzing coverage (#2208)

This commit is contained in:
Ivan Nardi
2023-12-11 19:24:17 +01:00
committed by GitHub
parent b3f2b1bb7f
commit 7b5354588b
15 changed files with 282 additions and 37 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
#include "ndpi_api.h"
#include "ndpi_private.h"
#include "fuzz_common_code.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
@@ -35,7 +36,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
ndpi_set_debug_bitmask(ndpi_struct, debug_bitmask);
fd = buffer_to_file(data, size);
ndpi_load_protocols_file_fd(ndpi_struct, fd);
load_protocols_file_fd(ndpi_struct, fd);
if(fd)
fclose(fd);