diff options
| author | Tom Rini <[email protected]> | 2026-02-27 08:12:04 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-02-27 08:12:22 -0600 |
| commit | e6e7b2427a78caef292065206da9f1a00a7c9139 (patch) | |
| tree | 09fa7d16b539dc296f8bf860cc6a809b1164333b /lib/efi_loader | |
| parent | 437ea9f8be5afaebe2d8cbab6242f1182857f21e (diff) | |
| parent | 89f6b9020db0960e219fc56d0d32aba82e42332a (diff) | |
Merge tag 'efi-2026-04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-04-rc4
CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/29389
UEFI:
* Correct LoadImage() return code for invalid parameters
and provide a test for it.
* Correct misspells in the test code.
Diffstat (limited to 'lib/efi_loader')
| -rw-r--r-- | lib/efi_loader/efi_boottime.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b424d924896..de57823bd44 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -2096,8 +2096,12 @@ efi_status_t EFIAPI efi_load_image(bool boot_policy, EFI_ENTRY("%d, %p, %pD, %p, %zu, %p", boot_policy, parent_image, file_path, source_buffer, source_size, image_handle); - if (!image_handle || (!source_buffer && !file_path) || - !efi_search_obj(parent_image) || + if (!source_buffer && !file_path) { + ret = EFI_NOT_FOUND; + goto error; + } + + if (!image_handle || !efi_search_obj(parent_image) || /* The parent image handle must refer to a loaded image */ !parent_image->type) { ret = EFI_INVALID_PARAMETER; |
