diff options
author | smasher164 <aindurti@gmail.com> | 2020-02-27 02:42:28 -0500 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-03-09 20:45:44 +0000 |
commit | d49fecc474d04a04d1d22851c06099338abd4391 (patch) | |
tree | f7e59e11f275b05b077e977fc393a1e10a6440b1 /src/vendor | |
parent | 5fac45a320561b45b52cdcae933882a70699a21d (diff) | |
download | go-d49fecc474d04a04d1d22851c06099338abd4391.tar.gz go-d49fecc474d04a04d1d22851c06099338abd4391.zip |
std,cmd: update x/net and github.com/google/pprof
Re-vendor x/net/dns/dnsmessage, x/net/route, and github.com/google/pprof
(commit 1ebb73c). The updated dependencies fix the string(int)
conversions, in preparation for the vet warning.
Updates #32479.
Change-Id: I023a4e30415d060f8b403b9943fe911f6d19f2e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/221337
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/vendor')
-rw-r--r-- | src/vendor/golang.org/x/net/dns/dnsmessage/message.go | 22 | ||||
-rw-r--r-- | src/vendor/golang.org/x/net/route/address.go | 4 | ||||
-rw-r--r-- | src/vendor/modules.txt | 2 |
3 files changed, 5 insertions, 23 deletions
diff --git a/src/vendor/golang.org/x/net/dns/dnsmessage/message.go b/src/vendor/golang.org/x/net/dns/dnsmessage/message.go index 82bcdcc838..da8bafd921 100644 --- a/src/vendor/golang.org/x/net/dns/dnsmessage/message.go +++ b/src/vendor/golang.org/x/net/dns/dnsmessage/message.go @@ -14,6 +14,7 @@ package dnsmessage import ( "errors" + "fmt" ) // Message formats @@ -1819,17 +1820,6 @@ func unpackText(msg []byte, off int) (string, int, error) { return string(msg[beginOff:endOff]), endOff, nil } -func skipText(msg []byte, off int) (int, error) { - if off >= len(msg) { - return off, errBaseLen - } - endOff := off + 1 + int(msg[off]) - if endOff > len(msg) { - return off, errCalcLen - } - return endOff, nil -} - // packBytes appends the wire format of field to msg. func packBytes(msg []byte, field []byte) []byte { return append(msg, field...) @@ -1844,14 +1834,6 @@ func unpackBytes(msg []byte, off int, field []byte) (int, error) { return newOff, nil } -func skipBytes(msg []byte, off int, field []byte) (int, error) { - newOff := off + len(field) - if newOff > len(msg) { - return off, errBaseLen - } - return newOff, nil -} - const nameLen = 255 // A Name is a non-encoded domain name. It is used instead of strings to avoid @@ -2159,7 +2141,7 @@ func unpackResourceBody(msg []byte, off int, hdr ResourceHeader) (ResourceBody, return nil, off, &nestedError{name + " record", err} } if r == nil { - return nil, off, errors.New("invalid resource type: " + string(hdr.Type+'0')) + return nil, off, fmt.Errorf("invalid resource type: %d", hdr.Type) } return r, off + int(hdr.Length), nil } diff --git a/src/vendor/golang.org/x/net/route/address.go b/src/vendor/golang.org/x/net/route/address.go index b71528191f..e3125a473b 100644 --- a/src/vendor/golang.org/x/net/route/address.go +++ b/src/vendor/golang.org/x/net/route/address.go @@ -46,12 +46,12 @@ func (a *LinkAddr) marshal(b []byte) (int, error) { data := b[8:] if nlen > 0 { b[5] = byte(nlen) - copy(data[:nlen], a.Addr) + copy(data[:nlen], a.Name) data = data[nlen:] } if alen > 0 { b[6] = byte(alen) - copy(data[:alen], a.Name) + copy(data[:alen], a.Addr) data = data[alen:] } return ll, nil diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt index 1c56a34019..6feb23d65d 100644 --- a/src/vendor/modules.txt +++ b/src/vendor/modules.txt @@ -8,7 +8,7 @@ golang.org/x/crypto/curve25519 golang.org/x/crypto/hkdf golang.org/x/crypto/internal/subtle golang.org/x/crypto/poly1305 -# golang.org/x/net v0.0.0-20200219183655-46282727080f +# golang.org/x/net v0.0.0-20200301022130-244492dfa37a ## explicit golang.org/x/net/dns/dnsmessage golang.org/x/net/http/httpguts |