summaryrefslogtreecommitdiffstats
path: root/otautil/sysutil.cpp
diff options
context:
space:
mode:
authorxunchang <xunchang@google.com>2019-03-22 16:54:35 +0100
committerTianjie Xu <xunchang@google.com>2019-05-01 21:09:38 +0200
commit311e6ca7b609e578c0ec132440a4ad981db70a9e (patch)
tree206a8c1268e4664cb06890f9835d86e83014ae8a /otautil/sysutil.cpp
parentMerge changes I2d42f55a,Ic1b5dbf7 (diff)
downloadandroid_bootable_recovery-311e6ca7b609e578c0ec132440a4ad981db70a9e.tar
android_bootable_recovery-311e6ca7b609e578c0ec132440a4ad981db70a9e.tar.gz
android_bootable_recovery-311e6ca7b609e578c0ec132440a4ad981db70a9e.tar.bz2
android_bootable_recovery-311e6ca7b609e578c0ec132440a4ad981db70a9e.tar.lz
android_bootable_recovery-311e6ca7b609e578c0ec132440a4ad981db70a9e.tar.xz
android_bootable_recovery-311e6ca7b609e578c0ec132440a4ad981db70a9e.tar.zst
android_bootable_recovery-311e6ca7b609e578c0ec132440a4ad981db70a9e.zip
Diffstat (limited to '')
-rw-r--r--otautil/sysutil.cpp5
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));
}