From 66028930dac08f7116b5e3cdba35c3e65676c0cd Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 9 Mar 2022 19:56:23 +0100 Subject: 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 Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index e390d323a98..110d8ae79cc 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -342,7 +342,7 @@ struct efi_open_protocol_info_item { */ struct efi_handler { struct list_head link; - const efi_guid_t *guid; + const efi_guid_t guid; void *protocol_interface; struct list_head open_infos; }; -- cgit v1.2.3