forked from TrueCloudLab/frostfs-node
[#431] object/range: Fix payload slice allocation in re-sign callback
Allocate capacity instead of length of the slice to write the object payload range since each chunk is written through `append`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
36088949fc
commit
7366d62e41
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ func (s *Service) toRangePrm(req *objectV2.GetRangeRequest, stream objectSvc.Get
|
||||||
return nil, errors.Wrap(err, "could not create Get payload range stream")
|
return nil, errors.Wrap(err, "could not create Get payload range stream")
|
||||||
}
|
}
|
||||||
|
|
||||||
payload := make([]byte, body.GetRange().GetLength())
|
payload := make([]byte, 0, body.GetRange().GetLength())
|
||||||
|
|
||||||
resp := new(objectV2.GetRangeResponse)
|
resp := new(objectV2.GetRangeResponse)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue