Merge "liblp: SparseBuilder: num_blocks aren't check correctly" am: af4a0e846e
am: a6f70fb0e4

Change-Id: Ie15826f0e68012842fe59aebd92df2c61cf47b1a
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.