Skip to content
Snippets Groups Projects
Commit df93cd9c authored by Pantelis Antoniou's avatar Pantelis Antoniou Committed by Marek Vasut
Browse files

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: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
parent ea3e2122
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ...@@ -50,7 +50,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (ret) if (ret)
return CMD_RET_FAILURE; return CMD_RET_FAILURE;
if (strcmp(argv[3], "list") == 0) { if (argc > 3 && strcmp(argv[3], "list") == 0) {
dfu_show_entities(); dfu_show_entities();
goto done; goto done;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment