aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-06-05 14:45:21 +0200
committerGitHub <noreply@github.com>2022-06-05 14:45:21 +0200
commit1d492c9ed843a7372692b6a4c946d794ecb8b8b6 (patch)
tree5cea7c981b3fd5fe3a733bfdb91f91afb6d130a6
parent59c084b166c814a4331d91e176e757126f9373e9 (diff)
Fix some debug messages (#1583)
Increase max number of flows handled during fuzzing
-rw-r--r--fuzz/fuzz_ndpi_reader.c2
-rw-r--r--src/lib/protocols/kerberos.c2
-rw-r--r--src/lib/protocols/telnet.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/fuzz/fuzz_ndpi_reader.c b/fuzz/fuzz_ndpi_reader.c
index abf5a6743..508bca3ca 100644
--- a/fuzz/fuzz_ndpi_reader.c
+++ b/fuzz/fuzz_ndpi_reader.c
@@ -57,7 +57,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
}
prefs->decode_tunnels = 1;
prefs->num_roots = 16;
- prefs->max_ndpi_flows = 1024 * 1024;
+ prefs->max_ndpi_flows = 16 * 1024 * 1024;
prefs->quiet_mode = 0;
workflow = ndpi_workflow_init(prefs, NULL /* pcap handler will be set later */, 0, ndpi_serialization_format_json);
diff --git a/src/lib/protocols/kerberos.c b/src/lib/protocols/kerberos.c
index 9c166128f..9d2969e51 100644
--- a/src/lib/protocols/kerberos.c
+++ b/src/lib/protocols/kerberos.c
@@ -671,7 +671,7 @@ void ndpi_search_kerberos(struct ndpi_detection_module_struct *ndpi_struct,
if (krb_parse(ndpi_struct, flow, 8) != 0)
{
- NDPI_LOG_ERR(ndpi_struct, "[TGS-REP] Invalid packet received\n");
+ NDPI_LOG_DBG(ndpi_struct, "[TGS-REP] Invalid packet received\n");
return;
}
NDPI_LOG_DBG(ndpi_struct,
diff --git a/src/lib/protocols/telnet.c b/src/lib/protocols/telnet.c
index 45ab36d0b..43badd08c 100644
--- a/src/lib/protocols/telnet.c
+++ b/src/lib/protocols/telnet.c
@@ -39,7 +39,8 @@ static int search_telnet_again(struct ndpi_detection_module_struct *ndpi_struct,
int i;
#ifdef TELNET_DEBUG
- printf("==> %s() [%s][direction: %u]\n", __FUNCTION__, packet->payload, packet->packet_direction);
+ printf("==> %s() [%.*s][direction: %u]\n", __FUNCTION__, packet->payload_packet_len,
+ packet->payload, packet->packet_direction);
#endif
if((packet->payload == NULL)