From d37b69ce9c9caa979de7c511e33cb7d1cf5fbc91 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Wed, 4 Dec 2019 18:36:54 +0100 Subject: Fix corner case causing access to already freed memory --- src/lib/ndpi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 18173d555..e31237980 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4702,7 +4702,7 @@ ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct ndpi_process_extra_packet(ndpi_str, flow, packet, packetlen, current_tick_l, src, dst); /* Update in case of new match */ ret.master_protocol = flow->detected_protocol_stack[1], ret.app_protocol = flow->detected_protocol_stack[0], ret.category = flow->category;; - return(ret); + goto invalidate_ptr; } else goto ret_protocols; } -- cgit v1.2.3