Skip to content

Commit 1434803

Browse files
committed
Fixed signed overflow
1 parent 9cabed9 commit 1434803

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PersistentCheckpointing.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ static void write_map(const WriteVmConfig& cfg,
164164
FILE_OP_FATAL(file) << "couldn't truncate file to size "
165165
<< map.map.size();
166166

167-
auto bytes_read = 0;
168-
while (static_cast<size_t>(bytes_read) < map.map.size()) {
167+
auto bytes_read = 0ull;
168+
while(static_cast<size_t>(bytes_read) < map.map.size()) {
169169
const auto current_read = cfg.pread(bytes_read, map.map);
170170
if (current_read == -1)
171171
FILE_OP_FATAL(file) << " couldn't read contents of " << map.map.str();

0 commit comments

Comments
 (0)