mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 17:36:26 -05:00
Reject parity sizes exceeding data_off_t range and remove redundant block size casts
This commit is contained in:
parent
149b408c38
commit
bcc06e10c6
6 changed files with 14 additions and 9 deletions
|
|
@ -2019,11 +2019,11 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
* but must not be shorter than used_size (which indicates missing parity).
|
||||
*/
|
||||
blockmax = parity_allocated_size(state);
|
||||
size = blockmax * (data_off_t)state->block_size;
|
||||
size = blockmax * state->block_size;
|
||||
|
||||
/* minimum size of the parity files we expect */
|
||||
used_paritymax = parity_used_size(state);
|
||||
used_parity_size = used_paritymax * (data_off_t)state->block_size;
|
||||
used_parity_size = used_paritymax * state->block_size;
|
||||
|
||||
if (blockstart > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue