commit | 44884d5c319647b499241386b750b7a763581541 | [log] [tgz] |
---|---|---|
author | Newton Lam <newtonlam@google.com> | Mon Oct 14 20:52:32 2024 +0000 |
committer | Newton Lam <newtonlam@google.com> | Mon Oct 14 20:52:32 2024 +0000 |
tree | f0eaf0affea6cb5fa0039c9da61603613f09e64d | |
parent | 7e0ba3af9a8792b050a9e2f628884ea90bf8ef8e [diff] |
Use uint64_t instead of size_t when calculating extent size to avoid overflow Change-Id: I22a77162d08fd7e82ffaa3e0c6c8adb6e956f7d1
diff --git a/fs_mgr/liblp/super_layout_builder.cpp b/fs_mgr/liblp/super_layout_builder.cpp index fd7416b..bff26ea 100644 --- a/fs_mgr/liblp/super_layout_builder.cpp +++ b/fs_mgr/liblp/super_layout_builder.cpp
@@ -184,7 +184,7 @@ 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);