efi stub: accept it if our loaded image has no FilePath field set
authorLennart Poettering <lennart@poettering.net>
Tue, 23 Feb 2021 13:16:08 +0000 (14:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 12 Mar 2021 16:35:57 +0000 (17:35 +0100)
commit151c62b5bcb7124ec43fbd7e21872974e1d9e500
tree93ac0e78e6bfbaa30ab0e6fbc82b6275d50e16ee
parent15e25018f420752347d31c386103dd9e0be0f0ad
efi stub: accept it if our loaded image has no FilePath field set

The firmware spec doesn't really say whether FilePath of the LoadedImage
protocol may be NULL or not. So far we assumed it to be non-NULL, but
apparently the FreeBSD UEFI chainloader sets it to NULL. Handle this
gracefully.

(Noticed and tracked down by Alexander Schreiber)

Fixes: #18733
(cherry picked from commit 685097b9cadf92d21dfa857c3a7ddc1ba115088e)
src/boot/efi/stub.c