mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 22:00:19 -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
|
|
@ -375,7 +375,7 @@ ssize_t handle_read(struct snapraid_handle* handle, block_off_t file_pos, unsign
|
|||
unsigned count;
|
||||
int ret;
|
||||
|
||||
offset = file_pos * (data_off_t)block_size;
|
||||
offset = file_pos * block_size;
|
||||
|
||||
if (!out_missing)
|
||||
out_missing = log_error;
|
||||
|
|
@ -456,7 +456,7 @@ int handle_write(struct snapraid_handle* handle, block_off_t file_pos, unsigned
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
offset = file_pos * (data_off_t)block_size;
|
||||
offset = file_pos * block_size;
|
||||
|
||||
write_size = file_block_size(handle->file, file_pos, block_size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue