Skip to content

Commit

Permalink
Handle "0" in domain names
Browse files Browse the repository at this point in the history
  • Loading branch information
ValdikSS committed Mar 5, 2022
1 parent 8383eca commit 55a3a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/goodbyedpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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<hnlen; i++) {
if (!( (hnaddr[i] >= '1' && hnaddr[i] <= '9') ||
if (!( (hnaddr[i] >= '0' && hnaddr[i] <= '9') ||
(hnaddr[i] >= 'a' && hnaddr[i] <= 'z') ||
hnaddr[i] == '.' || hnaddr[i] == '-'))
{
Expand Down

0 comments on commit 55a3a94

Please sign in to comment.