Reject parity sizes exceeding data_off_t range and remove redundant block size casts

This commit is contained in:
Andrea Mazzoleni 2026-09-24 20:40:27 +02:00
parent 149b408c38
commit bcc06e10c6
6 changed files with 14 additions and 9 deletions

View file

@ -3087,7 +3087,7 @@ int state_check(struct snapraid_state* state, int fix, block_off_t blockstart, b
*/
blockmax = parity_allocated_size(state);
size = blockmax * (data_off_t)state->block_size;
size = blockmax * state->block_size;
if (blockstart > blockmax) {
/* LCOV_EXCL_START */