Fix edns0 overflow message

This commit is contained in:
Miek Gieben 2012-01-12 20:22:21 +01:00
parent c70a559315
commit 036d6e4c2c
1 changed files with 2 additions and 2 deletions

4
msg.go
View File

@ -579,8 +579,8 @@ func unpackStructValue(val reflect.Value, msg []byte, off int) (off1 int, ok boo
off += net.IPv6len
case "OPT": // EDNS
if off+2 > lenmsg {
println("dns: overflow unpacking OPT")
// No room for anything else
// This is an ENDNS0 (OPT Record) with no rdata
// We can savely return here.
break
}
opt := make([]Option, 1)