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
184 changed files with 436 additions and 60 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
uint8_t protocol_was_guessed;
if (ndpi_info_mod == NULL) {
fuzz_init_detection_module(&ndpi_info_mod, 0);
fuzz_init_detection_module(&ndpi_info_mod);
ndpi_init_serializer(&json_serializer, ndpi_serialization_format_json);
ndpi_init_serializer(&csv_serializer, ndpi_serialization_format_csv);