The function expects an end address but is being called with an size instead.
Fixes: 6422820ac3 ("efi_loader: split unrelated code from efi_bootmgr.c") Signed-off-by: Moritz Fischer <mori...@google.com> --- lib/efi_loader/efi_bootbin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_bootbin.c b/lib/efi_loader/efi_bootbin.c index a87006b3c0..798bcd6eee 100644 --- a/lib/efi_loader/efi_bootbin.c +++ b/lib/efi_loader/efi_bootbin.c @@ -137,7 +137,8 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size) */ file_path = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE, (uintptr_t)source_buffer, - source_size); + (uintptr_t)source_buffer + + (size_t)source_size); /* * Make sure that device for device_path exist * in load_image(). Otherwise, shell and grub will fail. -- 2.47.0.163.g1226f6d8fa-goog