mirror of
https://github.com/schoebel/mars
synced 2024-12-26 08:32:24 +00:00
copy: safeguard cursor position
This commit is contained in:
parent
0ed45aa2b5
commit
fff046e1d0
@ -294,7 +294,7 @@ int _make_mref(struct copy_brick *brick, int index, int queue, void *data,
|
||||
int len;
|
||||
int status = -EAGAIN;
|
||||
|
||||
if (brick->clash || end_pos <= 0)
|
||||
if (brick->clash || pos < 0 || end_pos <= 0 || pos >= end_pos)
|
||||
goto done;
|
||||
|
||||
mref = copy_alloc_mref(brick);
|
||||
|
Loading…
Reference in New Issue
Block a user