Merge pull request #11143 from aep/for-upstream

fixes #11142 missing array length check on release
pull/11148/head
Matt Farina 2 years ago committed by GitHub
commit 4b18b19a5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,7 @@ func decodeRelease(data string) (*rspb.Release, error) {
// For backwards compatibility with releases that were stored before // For backwards compatibility with releases that were stored before
// compression was introduced we skip decompression if the // compression was introduced we skip decompression if the
// gzip magic header is not found // gzip magic header is not found
if bytes.Equal(b[0:3], magicGzip) { if len(b) > 3 && bytes.Equal(b[0:3], magicGzip) {
r, err := gzip.NewReader(bytes.NewReader(b)) r, err := gzip.NewReader(bytes.NewReader(b))
if err != nil { if err != nil {
return nil, err return nil, err

Loading…
Cancel
Save