From 9fa35cc1709cd6d6980372bded95260e4e9e2f1e Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Tue, 4 Sep 2018 12:41:21 -0700 Subject: [PATCH] fs_mgr: liblp: add check failure for sectors_per_block Test: compile Bug: 109821005 Change-Id: I88bf4c785c6f46a308c1d8b09edcbde53e29a004 --- fs_mgr/liblp/builder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fs_mgr/liblp/builder.cpp b/fs_mgr/liblp/builder.cpp index 2015e4d78..018c2802c 100644 --- a/fs_mgr/liblp/builder.cpp +++ b/fs_mgr/liblp/builder.cpp @@ -386,6 +386,7 @@ bool MetadataBuilder::GrowPartition(Partition* partition, uint64_t aligned_size) } const uint64_t sectors_per_block = device_info_.logical_block_size / LP_SECTOR_SIZE; + CHECK_NE(sectors_per_block, 0); CHECK(sectors_needed % sectors_per_block == 0); // Find gaps that we can use for new extents. Note we store new extents in a