mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 15:06:34 -05:00
Add protection for block position integer overflow
This commit is contained in:
parent
c814b474be
commit
cc99a22929
5 changed files with 25 additions and 17 deletions
|
|
@ -1454,7 +1454,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
}
|
||||
|
||||
/* adjust the number of block to process */
|
||||
if (blockcount != 0 && blockstart + blockcount < blockmax) {
|
||||
if (blockcount != 0 && blockcount < blockmax - blockstart) {
|
||||
blockmax = blockstart + blockcount;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue