diff options
author | Luca Deri <deri@ntop.org> | 2019-02-21 23:29:06 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-02-21 23:29:06 +0100 |
commit | 47669abd441888003c5ae815775c84763fd6f1c2 (patch) | |
tree | 08562d76acf45d995cbbb10b9461a07aca189a9a | |
parent | ab3833a708fbd56e7edc72169563d26dffeb14de (diff) |
Added extra check to avoid nDPI wrong matches
-rw-r--r-- | src/lib/ndpi_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |