aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos/vboot2/verstub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/google/chromeos/vboot2/verstub.c')
-rw-r--r--src/vendorcode/google/chromeos/vboot2/verstub.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vendorcode/google/chromeos/vboot2/verstub.c b/src/vendorcode/google/chromeos/vboot2/verstub.c
index e8faa071c5..8f2e9b2d49 100644
--- a/src/vendorcode/google/chromeos/vboot2/verstub.c
+++ b/src/vendorcode/google/chromeos/vboot2/verstub.c
@@ -32,9 +32,8 @@ static struct vb2_working_data *init_vb2_working_data(void)
wd = vboot_get_working_data();
memset(wd, 0, _vboot2_work_size);
/* 8-byte alignment for ARMv7 */
- wd->buffer = ALIGN_UP((uintptr_t)&wd[1], 8);
- wd->buffer_size = _vboot2_work_size + (uintptr_t)wd
- - (uintptr_t)wd->buffer;
+ wd->buffer_offset = ALIGN_UP(sizeof(*wd), 8);
+ wd->buffer_size = _vboot2_work_size - wd->buffer_offset;
return wd;
}