Add some fuzzers to test other data structures. (#1870)

Start using a dictionary for fuzzing (see:
https://llvm.org/docs/LibFuzzer.html#dictionaries).
Remove some dead code.
Fuzzing with debug enabled is not usually a great idea (from performance
POV). Keep the code since it might be useful while debugging.
This commit is contained in:
Ivan Nardi 2023-01-25 11:44:59 +01:00 committed by GitHub
parent 29c5cc39fb
commit 9fc724de5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
184 changed files with 436 additions and 60 deletions

View file

@ -28,7 +28,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
u_int32_t first_int, version = 0;
if(ndpi_info_mod == NULL) {
fuzz_init_detection_module(&ndpi_info_mod, 0);
fuzz_init_detection_module(&ndpi_info_mod);
flow = ndpi_calloc(1, SIZEOF_FLOW_STRUCT);
}