projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b5e420
)
sandbox: Check the filename in jump_to_image_no_args()
author
Simon Glass
<sjg@chromium.org>
Sat, 24 Nov 2018 04:29:25 +0000
(21:29 -0700)
committer
Simon Glass
<sjg@chromium.org>
Wed, 5 Dec 2018 13:01:34 +0000
(06:01 -0700)
If the filename is NULL this function currently crashes. Update it to fail
gracefully.
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/spl.c
patch
|
blob
|
history
diff --git
a/arch/sandbox/cpu/spl.c
b/arch/sandbox/cpu/spl.c
index 5005ed2f54a5506ba1b50f9d2dce04d1eec4ca79..2ca4cd6e35ece6d439e501ffed26881768caa35d 100644
(file)
--- a/
arch/sandbox/cpu/spl.c
+++ b/
arch/sandbox/cpu/spl.c
@@
-69,7
+69,11
@@
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
{
const char *fname = spl_image->arg;
- os_fd_restore();
- os_spl_to_uboot(fname);
+ if (fname) {
+ os_fd_restore();
+ os_spl_to_uboot(fname);
+ } else {
+ printf("No filename provided for U-Boot\n");
+ }
hang();
}