Update vendoring. (#1257)

* Update vendoring.

Update vendoring to latest upstream.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2019-02-13 14:12:12 +01:00 committed by GitHub
commit dc4c58671d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
257 changed files with 39320 additions and 7619 deletions

View file

@ -6,7 +6,7 @@ os:
- osx
sudo: required
before_install:
- go get github.com/golang/lint/golint
- go get golang.org/x/lint/golint
- go get honnef.co/go/tools/cmd/staticcheck
- go get -d ./...
script:

View file

@ -49,7 +49,7 @@ func (a *Attribute) unmarshal(b []byte) error {
a.Length = nlenc.Uint16(b[0:2])
a.Type = nlenc.Uint16(b[2:4])
if nlaAlign(int(a.Length)) > len(b) {
if int(a.Length) > len(b) {
return errInvalidAttribute
}
@ -107,7 +107,7 @@ func UnmarshalAttributes(b []byte) ([]Attribute, error) {
var attrs []Attribute
var i int
for {
if len(b[i:]) == 0 {
if i > len(b) || len(b[i:]) == 0 {
break
}

View file

@ -165,6 +165,8 @@ func (c *conn) Receive() ([]Message, error) {
return nil, errInvalidFamily
}
n = nlmsgAlign(n)
raw, err := syscall.ParseNetlinkMessage(b[:n])
if err != nil {
return nil, err