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:
ea3e212
)
dfu: Fix crash when wrong number of arguments given
author
Pantelis Antoniou
<panto@antoniou-consulting.com>
Fri, 30 Nov 2012 08:01:08 +0000
(08:01 +0000)
committer
Marek Vasut
<marex@denx.de>
Sat, 16 Mar 2013 20:12:01 +0000
(21:12 +0100)
Fix obvious crash when not enough arguments are given to the dfu
command.
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
common/cmd_dfu.c
patch
|
blob
|
history
diff --git
a/common/cmd_dfu.c
b/common/cmd_dfu.c
index 327c738af795d250d3a824349cad4cdac84454b9..83ef32497a865bf63586d024c54de07bea62e515 100644
(file)
--- a/
common/cmd_dfu.c
+++ b/
common/cmd_dfu.c
@@
-50,7
+50,7
@@
static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (ret)
return CMD_RET_FAILURE;
- if (strcmp(argv[3], "list") == 0) {
+ if (
argc > 3 &&
strcmp(argv[3], "list") == 0) {
dfu_show_entities();
goto done;
}