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

@ -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
}