Skip to content

Commit

Permalink
fixes helm#11142 missing array length check on release
Browse files Browse the repository at this point in the history
  • Loading branch information
aep committed Jul 13, 2022
1 parent 9377988 commit d248b6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/storage/driver/util.go
Expand Up @@ -60,6 +60,10 @@ func decodeRelease(data string) (*rspb.Release, error) {
return nil, err
}

if len(b) < 3 {
return nil, errors.New("too short to be a valid gzip")
}

// For backwards compatibility with releases that were stored before
// compression was introduced we skip decompression if the
// gzip magic header is not found
Expand Down

0 comments on commit d248b6f

Please sign in to comment.