summaryrefslogtreecommitdiff
path: root/vendor/github.com/miekg/dns/msg.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/miekg/dns/msg.go')
-rw-r--r--vendor/github.com/miekg/dns/msg.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/miekg/dns/msg.go b/vendor/github.com/miekg/dns/msg.go
index 60a2e8c3d..89ebb64ab 100644
--- a/vendor/github.com/miekg/dns/msg.go
+++ b/vendor/github.com/miekg/dns/msg.go
@@ -265,6 +265,11 @@ loop:
wasDot = false
case '.':
+ if i == 0 && len(s) > 1 {
+ // leading dots are not legal except for the root zone
+ return len(msg), ErrRdata
+ }
+
if wasDot {
// two dots back to back is not legal
return len(msg), ErrRdata