summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2021-01-22 04:43:49 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-23 09:56:53 +0300
commitf7cd8b7b55fdd4501bc6e405b2251236cf30969e (patch)
tree081090cb00374f763f83343ae8a46ca7ee07d5a5 /tools
parent8f1844c3335be8bcf22de63057cf8f0c11416d00 (diff)
downloadu-boot-f7cd8b7b55fdd4501bc6e405b2251236cf30969e.tar.xz
tools: mkeficapsule: fill reserved members of structure
Fill reserved members of efi_firmware_management_capsule_image_header structure with zero's for safety. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Fixes: CID 316354 Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/mkeficapsule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
index 270943fc90..36f693f096 100644
--- a/tools/mkeficapsule.c
+++ b/tools/mkeficapsule.c
@@ -310,6 +310,9 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid,
image.version = 0x00000003;
memcpy(&image.update_image_type_id, guid, sizeof(*guid));
image.update_image_index = index;
+ image.reserved[0] = 0;
+ image.reserved[1] = 0;
+ image.reserved[2] = 0;
image.update_image_size = bin_stat.st_size;
image.update_vendor_code_size = 0; /* none */
image.update_hardware_instance = instance;