commit | 14658c0dd7f374ca14e18cc5bb11a5a1c93bfeac | [log] [tgz] |
---|---|---|
author | Pantelis Antoniou <panto@antoniou-consulting.com> | Fri Nov 30 08:01:08 2012 +0000 |
committer | Marek Vasut <marex@denx.de> | Sat Mar 16 21:12:01 2013 +0100 |
tree | 95d6406d2a95eec792f6afcad86a2328a7d33032 | |
parent | 4e3aac01f74e3b72a9aeb92cb8b7d5100bf5a76f [diff] [blame] |
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>
diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index 327c738..83ef324 100644 --- a/common/cmd_dfu.c +++ b/common/cmd_dfu.c
@@ -50,7 +50,7 @@ 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; }