libsnapshot: Fix broken iterator in CompressedSnapshotReader.

Bug: NA
Test: apply full OTA with VABC
Change-Id: I9173ac1c6fb601a6f9e0bfb935d7908e0f234f0f
This commit is contained in:
David Anderson 2020-11-06 15:09:46 -08:00
parent d021544d04
commit 4137dee0e5

View file

@ -91,6 +91,7 @@ bool CompressedSnapshotReader::SetCow(std::unique_ptr<CowReader>&& cow) {
while (!op_iter_->Done()) {
const CowOperation* op = &op_iter_->Get();
if (op->type == kCowLabelOp || op->type == kCowFooterOp) {
op_iter_->Next();
continue;
}
if (op->new_block >= ops_.size()) {