Update miekg/dns

This commit is contained in:
Frank Denis 2021-02-02 09:48:11 +01:00
parent 472ab609e4
commit b131708cd6
8 changed files with 36 additions and 26 deletions

11
vendor/github.com/miekg/dns/msg.go generated vendored
View file

@ -624,11 +624,18 @@ func UnpackRRWithHeader(h RR_Header, msg []byte, off int) (rr RR, off1 int, err
rr = &RFC3597{Hdr: h}
}
if noRdata(h) {
return rr, off, nil
if off < 0 || off > len(msg) {
return &h, off, &Error{err: "bad off"}
}
end := off + int(h.Rdlength)
if end < off || end > len(msg) {
return &h, end, &Error{err: "bad rdlength"}
}
if noRdata(h) {
return rr, off, nil
}
off, err = rr.unpack(msg, off)
if err != nil {