mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 14:20:05 -05:00
Fixes a possible integer overflow in scrub counting.
Conflicts: HISTORY
This commit is contained in:
parent
f3864bc797
commit
b1f2ff9469
2 changed files with 3 additions and 1 deletions
2
scrub.c
2
scrub.c
|
|
@ -492,7 +492,7 @@ int state_scrub(struct snapraid_state* state, int percentage, int olderthan)
|
|||
recentlimit = now;
|
||||
} else if (percentage != -1 || olderthan != -1) {
|
||||
if (percentage != -1)
|
||||
countlimit = (blockmax * percentage + 99) / 100;
|
||||
countlimit = (blockmax * (uint64_t)percentage + 99) / 100;
|
||||
else
|
||||
countlimit = blockmax;
|
||||
if (olderthan != -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue