Fix 32-bit integer truncation in block metadata allocations and file_block

This commit is contained in:
Andrea Mazzoleni 2026-08-26 17:06:28 +02:00
parent 527bd69129
commit c7b8068e36
5 changed files with 85 additions and 11 deletions

View file

@ -866,7 +866,7 @@ void file_copy(struct snapraid_file* src_file, struct snapraid_file* dest_file);
*
* Note that the block size if a runtime value.
*/
static inline struct snapraid_block* file_block(struct snapraid_file* file, size_t pos)
static inline struct snapraid_block* file_block(struct snapraid_file* file, block_off_t pos)
{
unsigned char* ptr = (unsigned char*)file->blockvec;