mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Filter out invalid characters in domain names.
This commit is contained in:
committed by
Simon Kelley
parent
c7a93f6e4e
commit
b98f771519
@@ -93,6 +93,8 @@ static int extract_name_no_compression(unsigned char *rr, int maxlen, char *buf)
|
||||
while (count-- >= 0 && rr < end)
|
||||
{
|
||||
*buf = *rr++;
|
||||
if (!isascii(*buf) || iscntrl(*buf) || *buf == '.')
|
||||
return 0;
|
||||
if (*buf >= 'A' && *buf <= 'Z')
|
||||
*buf += 'a' - 'A';
|
||||
buf++;
|
||||
|
||||
Reference in New Issue
Block a user