From 55a3a94065dea2fa3edb3ac73156a05bd1d47426 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Sun, 6 Mar 2022 00:22:22 +0300 Subject: [PATCH] Handle "0" in domain names --- src/goodbyedpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] == '-')) {