Filter out invalid characters in domain names.

This commit is contained in:
Giovanni Bajo
2012-04-22 15:59:27 +02:00
committed by Simon Kelley
parent c7a93f6e4e
commit b98f771519

View File

@@ -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++;