efi: properly terminate filepath with NULL in chainloader
authorAndrei Borzenkov <arvidjaar@gmail.com>
Thu, 15 Dec 2016 13:07:00 +0000 (16:07 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Thu, 15 Dec 2016 13:07:00 +0000 (16:07 +0300)
commitce95549cc54b5d6f494608a7c390dba3aab4fba7
tree1de8364e82ae59de23ec83f0a5357b294ee766e4
parenta3e9da054d00260f274cfd9d1b9611c32ecd437c
efi: properly terminate filepath with NULL in chainloader

EFI File Path Media Device Path is defined as NULL terminated string;
but chainloader built file paths without final NULL. This caused error
with Secure Boot and Linux Foundation PreLoader on Acer with InsydeH20 BIOS.
Apparently firmware failed verification with EFI_INVALID_PARAMETER which is
considered fatal error by PreLoader.

Reported and tested by Giovanni Santini <itachi.sama.amaterasu@gmail.com>
grub-core/loader/efi/chainloader.c