commit | d01e26a021a7c56e42a899a6da7bbfb1cb74a153 | [log] [tgz] |
---|---|---|
author | Kelvin Zhang <zhangkelvin@google.com> | Tue Mar 15 23:04:39 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Mar 15 23:04:39 2022 +0000 |
tree | a2bc93b723e96fb0f0589b87ced3c0d6ddcf5898 | |
parent | 6cea26a579859393bb773aad19bf31d5d165dc92 [diff] | |
parent | dc122bcb2dc7d172fa43b5f7a016a7dcfbdf7e60 [diff] |
Only verify source hash if there is one am: dc122bcb2d Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2027246 Change-Id: I1e903db87145bed8a1946cff75c0749e492c34d1
diff --git a/payload_consumer/vabc_partition_writer.cc b/payload_consumer/vabc_partition_writer.cc index 583ba4c..54aea86 100644 --- a/payload_consumer/vabc_partition_writer.cc +++ b/payload_consumer/vabc_partition_writer.cc
@@ -273,6 +273,9 @@ auto source_fd = std::make_shared<EintrSafeFileDescriptor>(); TEST_AND_RETURN_FALSE_ERRNO( source_fd->Open(install_part_.source_path.c_str(), O_RDONLY)); + if (!operation.has_src_sha256_hash()) { + return true; + } return PartitionWriter::ValidateSourceHash( operation, source_fd, block_size_, error); }