diff options
Diffstat (limited to '')
-rw-r--r-- | otautil/sysutil.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/otautil/sysutil.cpp b/otautil/sysutil.cpp index 2b4861809..420db4cac 100644 --- a/otautil/sysutil.cpp +++ b/otautil/sysutil.cpp @@ -94,6 +94,11 @@ BlockMapData BlockMapData::ParseBlockMapFile(const std::string& block_map_path) remaining_blocks -= range_blocks; } + if (remaining_blocks != 0) { + LOG(ERROR) << "Invalid ranges: remaining blocks " << remaining_blocks; + return {}; + } + return BlockMapData(block_dev, file_size, blksize, std::move(ranges)); } |