Skip to content

Commit

Permalink
fixes #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 committed Jul 13, 2022
1 parent 9377988 commit b9f347a
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 b9f347a

Please sign in to comment.