efi/chainloader: Propagate errors from copy_file_path()
commit098058752e1cee7b457ff45562a81e756ab0b532
authorDaniel Kiper <daniel.kiper@oracle.com>
Wed, 29 Jul 2020 11:38:31 +0000 (29 13:38 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 29 Jul 2020 14:55:48 +0000 (29 16:55 +0200)
tree5c4962b14987f32c5b1959ff1344eb1ecc92efac
parentd2cf823d0e31818d1b7a223daff6d5e006596543
efi/chainloader: Propagate errors from copy_file_path()

Without any error propagated to the caller, make_file_path()
would then try to advance the invalid device path node with
GRUB_EFI_NEXT_DEVICE_PATH(), which would fail, returning a NULL
pointer that would subsequently be dereferenced. Hence, propagate
errors from copy_file_path().

Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/efi/chainloader.c