mirror of https://github.com/schoebel/mars
copy: safeguard underflow
This commit is contained in:
parent
8412411390
commit
344c3a7e95
|
@ -750,6 +750,7 @@ int _run_copy(struct copy_brick *brick, loff_t this_start)
|
|||
|
||||
prev = -1;
|
||||
if (this_start > brick->copy_last) {
|
||||
if (this_start >= COPY_CHUNK)
|
||||
prev = GET_INDEX(this_start - COPY_CHUNK);
|
||||
max -= (this_start - brick->copy_last) / COPY_CHUNK;
|
||||
all_max = max;
|
||||
|
|
Loading…
Reference in New Issue