Merge "Use uint64_t instead of size_t when calculating extent size to avoid overflow" into main

This commit is contained in:
Newton Lam 2024-10-15 04:18:38 +00:00 committed by Gerrit Code Review
commit b3c9db481f

View file

@ -184,7 +184,7 @@ std::vector<SuperImageExtent> SuperLayoutBuilder::GetImageLayout() {
return {};
}
size_t size = e.num_sectors * LP_SECTOR_SIZE;
uint64_t size = e.num_sectors * LP_SECTOR_SIZE;
uint64_t super_offset = e.target_data * LP_SECTOR_SIZE;
extents.emplace_back(super_offset, size, image_name, image_offset);