mirror of
https://xff.cz/git/u-boot/
synced 2025-09-05 02:32:11 +02:00
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>
This commit is contained in:
committed by
Marek Vasut
parent
ea3e21226f
commit
df93cd9c6f
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user