summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2008-08-29 21:04:45 +0200
committerWolfgang Denk <wd@denx.de>2008-09-07 00:17:32 +0200
commit8e02494e8f86c8f2d7324b5eb9e75271104a01ef (patch)
tree511abb597d72daf34ffddce2ff0326fc52adf958 /common/cmd_bootm.c
parentcc347801add2689b1ee54d21f62bc14ecf6e1dd8 (diff)
Prevent crash if random DTB address is passed to bootm
This patch adds bootm_start() return value check. If error status is returned, we do not proceed further to prevent board reset or crash as we still can recover at this point. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 0db7b75ba..374085ca3 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -361,7 +361,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
ulong load_end = 0;
int ret;
- bootm_start(cmdtp, flag, argc, argv);
+ if (bootm_start(cmdtp, flag, argc, argv))
+ return 1;
/*
* We have reached the point of no return: we are going to