diff options
author | Pantelis Antoniou <panto@antoniou-consulting.com> | 2012-11-30 12:01:08 +0400 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-03-17 00:12:01 +0400 |
commit | df93cd9c6f620039ddcbbf68e8cfa3c3f0dba76f (patch) | |
tree | 95d6406d2a95eec792f6afcad86a2328a7d33032 /common | |
parent | ea3e21226fdae4bbcb88e2de13480d122f617d64 (diff) | |
download | u-boot-df93cd9c6f620039ddcbbf68e8cfa3c3f0dba76f.tar.xz |
dfu: Fix crash when wrong number of arguments given
Fix obvious crash when not enough arguments are given to the dfu
command.
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_dfu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index 327c738af7..83ef32497a 100644 --- 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; } |