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
Signed-off-by: Arvid E. Picciani <arvid@kraud.cloud>
  • Loading branch information
aep authored and zak905 committed Jan 19, 2023
1 parent 598c091 commit 548e965
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 548e965

Please sign in to comment.