diff --git a/src/goodbyedpi.c b/src/goodbyedpi.c index 8fa7313..cfa2ac8 100644 --- a/src/goodbyedpi.c +++ b/src/goodbyedpi.c @@ -415,7 +415,7 @@ static int extract_sni(const char *pktdata, unsigned int pktlen, } /* Validate that hostname has only ascii lowercase characters */ for (int i=0; i= '1' && hnaddr[i] <= '9') || + if (!( (hnaddr[i] >= '0' && hnaddr[i] <= '9') || (hnaddr[i] >= 'a' && hnaddr[i] <= 'z') || hnaddr[i] == '.' || hnaddr[i] == '-')) {