mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 21:57:44 +03:00
Update miekg/dns
This commit is contained in:
parent
472ab609e4
commit
b131708cd6
8 changed files with 36 additions and 26 deletions
11
vendor/github.com/miekg/dns/msg.go
generated
vendored
11
vendor/github.com/miekg/dns/msg.go
generated
vendored
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue