efi_loader: copy GUID in InstallProtocolInterface()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 9 Mar 2022 18:56:23 +0000 (19:56 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 12 Mar 2022 11:27:07 +0000 (12:27 +0100)
commit66028930dac08f7116b5e3cdba35c3e65676c0cd
tree79a836954752d499b8006dbe07e81257b3eb9c60
parentf95104825a127e9e76923336b1f755a9554e3126
efi_loader: copy GUID in InstallProtocolInterface()

InstallProtocolInterface() is called with a pointer to the protocol GUID.
There is not guarantee that the memory used by the caller for the protocol
GUID stays allocated. To play it safe the GUID should be copied to U-Boot's
internal structures.

Reported-by: Joerie de Gram <j.de.gram@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
include/efi_loader.h
lib/efi_loader/efi_boottime.c
lib/efi_loader/efi_image_loader.c