Fixes matches with domain name strings that start with a dot

This commit is contained in:
Luca Deri
2023-09-11 22:50:03 +02:00
parent 8e6500a0da
commit 1bf7e5face
4 changed files with 27 additions and 24 deletions
+4 -1
View File
@@ -91,7 +91,10 @@ bool ndpi_domain_classify_add(ndpi_domain_classify *s,
if(!s || !domain)
return(false);
/* Skip initial string . in domain names */
while(domain[0] == '.') domain++;
dot = strrchr(domain, '.');
if(!dot) return(false);