fixes #11142 missing array length check on release

Signed-off-by: Arvid E. Picciani <arvid@kraud.cloud>
pull/11143/head
Arvid E. Picciani 2 years ago
parent 9377988685
commit b9f347a574

@ -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

Loading…
Cancel
Save