diff options
Diffstat (limited to 'fuzz/fuzz_ndpi_reader.c')
-rw-r--r-- | fuzz/fuzz_ndpi_reader.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fuzz/fuzz_ndpi_reader.c b/fuzz/fuzz_ndpi_reader.c index d65e20b7c..7733b690f 100644 --- a/fuzz/fuzz_ndpi_reader.c +++ b/fuzz/fuzz_ndpi_reader.c @@ -11,8 +11,6 @@ struct ndpi_workflow_prefs *prefs = NULL; struct ndpi_workflow *workflow = NULL; -int nDPI_LogLevel = 0; -char *_debug_protocols = NULL; u_int32_t current_ndpi_memory = 0, max_ndpi_memory = 0; u_int8_t enable_protocol_guess = 1, enable_payload_analyzer = 0; u_int8_t enable_flow_stats = 1; @@ -36,7 +34,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { int r; char errbuf[PCAP_ERRBUF_SIZE]; NDPI_PROTOCOL_BITMASK all; - NDPI_PROTOCOL_BITMASK debug_bitmask; u_int i; FILE *fd; @@ -57,9 +54,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { workflow = ndpi_workflow_init(prefs, NULL /* pcap handler will be set later */, 0, ndpi_serialization_format_json); - NDPI_BITMASK_SET_ALL(debug_bitmask); - ndpi_set_log_level(workflow->ndpi_struct, 4); - ndpi_set_debug_bitmask(workflow->ndpi_struct, debug_bitmask); + ndpi_set_config(workflow->ndpi_struct, NULL, "log.level", "3"); + ndpi_set_config(workflow->ndpi_struct, "all", "log.enable", "1"); ndpi_load_protocols_file(workflow->ndpi_struct, "protos.txt"); ndpi_load_categories_file(workflow->ndpi_struct, "categories.txt", NULL); |