From 92a1be258117c6e68c5f5b92ce688e2cea089495 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Wed, 3 Nov 2021 15:40:07 +0100 Subject: [PATCH] Fix use-of-uninitialized-value (#1366) Close #1346 --- src/lib/ndpi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 5ff098ac2..de61b1db3 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -5363,7 +5363,7 @@ static int ndpi_do_guess(struct ndpi_detection_module_struct *ndpi_str, struct n if(flow->guessed_host_protocol_id >= NDPI_MAX_SUPPORTED_PROTOCOLS) { //u_int32_t num_calls; - NDPI_SELECTION_BITMASK_PROTOCOL_SIZE ndpi_selection_packet; + NDPI_SELECTION_BITMASK_PROTOCOL_SIZE ndpi_selection_packet = {0}; /* This is a custom protocol and it has priority over everything else */ ret->master_protocol = flow->guessed_protocol_id, ret->app_protocol = flow->guessed_host_protocol_id;