commit | 1fb86241ec5419ffb93daf436b857d47f1d33dd8 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Nov 14 06:57:46 2018 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Nov 14 06:57:46 2018 +0000 |
tree | ab64da0d1ed9ebedfd815c88f401475603d564b7 | |
parent | 14818a8841ee5f9c0ad1681dc2483280ebef2df6 [diff] | |
parent | d51339b12eaaf16422339709565289f8300121bc [diff] |
Merge "liblp: SparseBuilder: num_blocks aren't check correctly"
diff --git a/fs_mgr/liblp/images.cpp b/fs_mgr/liblp/images.cpp index a976643..a46836e 100644 --- a/fs_mgr/liblp/images.cpp +++ b/fs_mgr/liblp/images.cpp
@@ -120,7 +120,7 @@ return; } - uint64_t num_blocks = total_size % block_size; + uint64_t num_blocks = total_size / block_size; if (num_blocks >= UINT_MAX) { // libsparse counts blocks in unsigned 32-bit integers, so we check to // make sure we're not going to overflow.