commit | 29ef9adbdcf6aeb03e21670b5ef5cdf1e57449a0 | [log] [tgz] |
---|---|---|
author | Kelvin Zhang <zhangkelvin@google.com> | Tue Mar 15 23:57:36 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Mar 15 23:57:36 2022 +0000 |
tree | a2bc93b723e96fb0f0589b87ced3c0d6ddcf5898 | |
parent | 5d7b142728e9af94419cc3d636c09ecc683f611f [diff] | |
parent | 6d8db1892871c9247c3c82950480d4b9f091888c [diff] |
Only verify source hash if there is one am: dc122bcb2d am: d01e26a021 am: 6d8db18928 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2027246 Change-Id: I97f848b93b553367479a0e5dfabb9199d02f01c4
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); }