From: Moritz Fischer <moritzf@google.com>
To: u-boot@lists.denx.de
Cc: xypron.glpk@gmx.de, ilias.apalodimas@linaro.org,
trini@konsulko.com, pwildt@google.com,
Moritz Fischer <moritzf@google.com>
Subject: [PATCH] lib: efi_loader: Fix efi_dp_from_mem() call
Date: Wed, 30 Oct 2024 20:16:08 +0000 [thread overview]
Message-ID: <20241030201608.1247488-1-moritzf@google.com> (raw)
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 <moritzf@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
next reply other threads:[~2024-10-30 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 20:16 Moritz Fischer [this message]
2024-10-30 20:28 ` [PATCH] lib: efi_loader: Fix efi_dp_from_mem() call Ilias Apalodimas
2024-10-30 20:59 ` Moritz Fischer
2024-10-30 20:29 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241030201608.1247488-1-moritzf@google.com \
--to=moritzf@google.com \
--cc=ilias.apalodimas@linaro.org \
--cc=pwildt@google.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.