Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44884d5c authored by Newton Lam's avatar Newton Lam
Browse files

Use uint64_t instead of size_t when calculating extent size to avoid overflow

Change-Id: I22a77162d08fd7e82ffaa3e0c6c8adb6e956f7d1
parent 7e0ba3af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);