Filter out invalid characters in domain names.

This commit is contained in:
Giovanni Bajo authored and Simon Kelley committed 2013-08-20 15:41:18 +01:00
1 parent c7a93f6e4e
commit b98f771519
1 file changed
+2
+2
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++;