Skip to content

Commit

Permalink
Merge pull request #11143 from aep/for-upstream
Browse files Browse the repository at this point in the history
fixes #11142 missing array length check on release
  • Loading branch information
mattfarina committed Aug 9, 2022
2 parents 9fe4f2e + b9f347a commit 4b18b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/driver/util.go
Expand Up @@ -63,7 +63,7 @@ func decodeRelease(data string) (*rspb.Release, error) {
// For backwards compatibility with releases that were stored before
// compression was introduced we skip decompression if the
// 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))
if err != nil {
return nil, err
Expand Down

0 comments on commit 4b18b19

Please sign in to comment.