forked from TrueCloudLab/frostfs-node
[#2024] services/object: Cover corner cases for children OutOfRange
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
3eb2ac985d
commit
871be9d63d
1 changed files with 3 additions and 2 deletions
|
@ -88,11 +88,12 @@ func (exec *execCtx) initFromChild(obj oid.ID) (prev *oid.ID, children []oid.ID)
|
|||
var payload []byte
|
||||
|
||||
if rng := exec.ctxRange(); rng != nil {
|
||||
seekLen := rng.GetLength()
|
||||
seekOff := rng.GetOffset()
|
||||
seekLen := rng.GetLength()
|
||||
seekTo := seekOff + seekLen
|
||||
parSize := par.PayloadSize()
|
||||
|
||||
if seekOff+seekLen > parSize {
|
||||
if seekTo < seekOff || parSize < seekOff || parSize < seekTo {
|
||||
var errOutOfRange apistatus.ObjectOutOfRange
|
||||
|
||||
exec.err = errOutOfRange
|
||||
|
|
Loading…
Reference in a new issue