From 47669abd441888003c5ae815775c84763fd6f1c2 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Thu, 21 Feb 2019 23:29:06 +0100 Subject: Added extra check to avoid nDPI wrong matches --- src/lib/ndpi_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index f96f0e763..b0c25e8c5 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -2007,8 +2007,10 @@ static int ac_match_handler(AC_MATCH_t *m, AC_TEXT_t *txt, AC_REP_t *match) { has to match */ if(whatfound && (whatfound != buf) + && (m->patterns->astring[0] != '.') /* The searched patter does not start with . */ && strchr(m->patterns->astring, '.') /* The matched pattern has a . (e.g. numeric or sym IPs) */ - && (whatfound[-1] != '.')) + && (whatfound[-1] != '.') + ) return(0); } -- cgit v1.2.3