diff mbox

arm64: set correct length of device path end entry

Message ID 20140107170607.GB30907@bivouac.eciton.net
State Accepted
Commit 4d21c1019904598a991e847eef049c65f9c49bd9
Headers show

Commit Message

Leif Lindholm Jan. 7, 2014, 5:06 p.m. UTC
The length of the Device Path End entry in the grub_linux_boot()
funtcion is incorrectly set to 0. This triggers an assert failure
in debug builds of Tianocore.

The correct length is 4 bytes (1 byte type, 1 byte subtype,
2 bytes length).

Reported-by: Mark Salter <msalter@redhat.com>
diff mbox

Patch

diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
index 9d15aad..7c9bc2b 100644
--- a/grub-core/loader/arm64/linux.c
+++ b/grub-core/loader/arm64/linux.c
@@ -268,7 +268,7 @@  grub_linux_boot (void)
 
   mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE;
   mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
-  mempath[1].header.length = 0;
+  mempath[1].header.length = 4;
 
   b = grub_efi_system_table->boot_services;
   status = b->load_image (0, grub_efi_image_handle,