Fix TXT validation

This commit is contained in:
Miek Gieben 2012-02-22 22:11:40 +01:00
parent 1571b7a97b
commit c7dd37b000
1 changed files with 17 additions and 17 deletions

2
msg.go
View File

@ -666,7 +666,7 @@ func unpackStructValue(val reflect.Value, msg []byte, off int) (off1 int, ok boo
fv.Set(reflect.ValueOf(servers))
case "txt":
txt := make([]string, 0)
rdlength := int(val.FieldByName("Hdr").FieldByName("Rdlength").Uint())
rdlength := off + int(val.FieldByName("Hdr").FieldByName("Rdlength").Uint())
Txts:
l := int(msg[off])
if off+l+1 > lenmsg {