git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa0ba7f
)
bootmeth_efi: Check the filename-allocation in the network path
author
Simon Glass
<sjg@chromium.org>
Fri, 15 Nov 2024 23:19:18 +0000
(16:19 -0700)
committer
Tom Rini
<trini@konsulko.com>
Wed, 15 Jan 2025 14:48:42 +0000
(08:48 -0600)
If the filename cannot be set we should give up. Add the missing error
check.
Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootmeth_efi.c
patch
|
blob
|
history
diff --git
a/boot/bootmeth_efi.c
b/boot/bootmeth_efi.c
index
f711b9d
..
a299845
100644
(file)
--- a/
boot/bootmeth_efi.c
+++ b/
boot/bootmeth_efi.c
@@
-252,6
+252,8
@@
static int distro_efi_read_bootflow_net(struct bootflow *bflow)
if (!bootfile_name)
return log_msg_ret("bootfile_name", ret);
bflow->fname = strdup(bootfile_name);
+ if (!bflow->fname)
+ return log_msg_ret("fi0", -ENOMEM);
/* do the hideous EFI hack */
efi_set_bootdev("Net", "", bflow->fname, map_sysmem(addr, 0),