Make block_sizes uint64_t to prevent other integer overflow errors in the future

This commit is contained in:
Vitaliy Filippov
2026-03-07 12:02:57 +03:00
parent ae2b1f7802
commit 0bd9c26620
6 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -301,7 +301,7 @@ int blockstore_heap_t::read_blocks(uint64_t disk_offset, uint64_t disk_size, uin
heap_entry_t *wr = (heap_entry_t*)data;
if (wr->size > dsk->meta_block_size-block_offset)
{
fprintf(stderr, "Error: entry is too large in metadata block %u at %u (%u > max %u bytes). ",
fprintf(stderr, "Error: entry is too large in metadata block %u at %u (%u > max %ju bytes). ",
block_num, block_offset, wr->size, dsk->meta_block_size-block_offset);
corrupted_block:
if (allow_corrupted)