diff options
author | Heinrich Schuchardt | 2019-06-11 19:35:20 +0200 |
---|---|---|
committer | Heinrich Schuchardt | 2019-06-14 19:18:39 +0200 |
commit | 1d3e8dc7920d7fa32d4df76adea4809890a6de6c (patch) | |
tree | 82e495a36ceb77a6478998df6704d49e6131b283 /lib | |
parent | 200000387c2d16fa069af6e176d1fcb886024f4d (diff) |
efi_loader: loaded images cannot be started twice
If an image already has been started, return EFI_INVALID_PARAMETER when
StartImage() is called for the same handle again.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 251dfc4ecc4..275850a1a8f 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -2863,6 +2863,9 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle, EFI_ENTRY("%p, %p, %p", image_handle, exit_data_size, exit_data); /* Check parameters */ + if (image_obj->header.type != EFI_OBJECT_TYPE_LOADED_IMAGE) + return EFI_EXIT(EFI_INVALID_PARAMETER); + ret = EFI_CALL(efi_open_protocol(image_handle, &efi_guid_loaded_image, &info, NULL, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL)); |