Merge "Added check to copy AVB footer" am: 4aa47338f2

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2512556

Change-Id: I7fa470868758f4409e12ca56fae077b50c382326
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Daniel Zheng 2023-03-30 19:00:31 +00:00 committed by Automerger Merge Worker
commit 4b9782620e

View file

@ -1197,7 +1197,8 @@ static uint64_t get_partition_size(const std::string& partition) {
}
static void copy_avb_footer(const std::string& partition, struct fastboot_buffer* buf) {
if (buf->sz < AVB_FOOTER_SIZE || is_logical(partition)) {
if (buf->sz < AVB_FOOTER_SIZE || is_logical(partition) ||
should_flash_in_userspace(partition)) {
return;
}
// If overflows and negative, it should be < buf->sz.