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