Skip to content

Commit

Permalink
fix(blob): ensure that the share sequence is not empty (#2547)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgonkivs committed Aug 9, 2023
1 parent ec36e7e commit 3a3473d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blob/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func SharesToBlobs(rawShares []share.Share) ([]*Blob, error) {
return nil, err
}

// ensure that sequence length is not 0
if len(shareSequences) == 0 {
return nil, ErrBlobNotFound
}

blobs := make([]*Blob, len(shareSequences))
for i, sequence := range shareSequences {
data, err := sequence.RawData()
Expand Down

0 comments on commit 3a3473d

Please sign in to comment.