[#1077] objectsvc: Fix possible panic in GetRange()

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-04-05 15:54:36 +03:00 committed by Anton Nikiforov
parent 00b2b77b26
commit 93c0ccad4f
2 changed files with 206 additions and 16 deletions

View file

@ -114,7 +114,7 @@ func (a *assembler) initializeFromSourceObjectID(ctx context.Context, id oid.ID)
}
to := uint64(0)
if seekOff+seekLen > a.currentOffset+from {
if seekOff+seekLen >= a.currentOffset+from {
to = seekOff + seekLen - a.currentOffset
}