mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
sandbox: Check the filename in jump_to_image_no_args()
If the filename is NULL this function currently crashes. Update it to fail gracefully. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6b5e420137
commit
12efc933b9
1 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue