From 58665e93a98d014b53d131b2481ccab074efc9ff Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Tue, 6 Jul 2021 18:55:14 +0200 Subject: Fix return value of ndpi_match_string_subprotocol() (#1230) --- src/lib/ndpi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 854666b7a..d014da328 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -6682,7 +6682,7 @@ int ndpi_match_string_subprotocol(struct ndpi_detection_module_struct *ndpi_str, rc = ndpi_match_string_common(((AC_AUTOMATA_t *) automa->ac_automa), string_to_match,string_to_match_len, &ret_match->protocol_id, &ret_match->protocol_category, &ret_match->protocol_breed); - return rc < 0 ? rc : ret_match->protocol_id; + return rc < 0 ? NDPI_PROTOCOL_UNKNOWN : ret_match->protocol_id; } /* **************************************** */ -- cgit v1.2.3