Merge "fastboot: fix header_actual calculation"

am: 53135a4772

Change-Id: Ic14a7785f248ce15b3e01da0e6cd94b5f7a68921
This commit is contained in:
Fernando Lugo 2018-04-11 23:24:09 -07:00 committed by android-build-merger
commit 11f27f42f5
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ boot_img_hdr_v1* mkbootimg(void* kernel, int64_t kernel_size, void* ramdisk, int
const boot_img_hdr_v1& src, int64_t* bootimg_size) {
const size_t page_mask = src.page_size - 1;
int64_t header_actual = sizeof(boot_img_hdr_v1) & (~page_mask);
int64_t header_actual = (sizeof(boot_img_hdr_v1) + page_mask) & (~page_mask);
int64_t kernel_actual = (kernel_size + page_mask) & (~page_mask);
int64_t ramdisk_actual = (ramdisk_size + page_mask) & (~page_mask);
int64_t second_actual = (second_size + page_mask) & (~page_mask);