commit | b98f7715193be85454cbfe4eed7a3282788cef6e | [log] [tgz] |
---|---|---|
author | Giovanni Bajo <rasky@develer.com> | Sun Apr 22 15:59:27 2012 +0200 |
committer | Simon Kelley <simon@thekelleys.org.uk> | Tue Aug 20 15:41:18 2013 +0100 |
tree | 75865ec2d32b4698798f684fb06a0ec3e4e06a0e | |
parent | c7a93f6e4e054dfd7882f90f28fe42e4e5d4f641 [diff] |
Filter out invalid characters in domain names.
diff --git a/src/dnssec.c b/src/dnssec.c index 4cf9503..c5ba5f4 100644 --- a/src/dnssec.c +++ b/src/dnssec.c
@@ -93,6 +93,8 @@ while (count-- >= 0 && rr < end) { *buf = *rr++; + if (!isascii(*buf) || iscntrl(*buf) || *buf == '.') + return 0; if (*buf >= 'A' && *buf <= 'Z') *buf += 'a' - 'A'; buf++;