Skip to content

Commit 34031e9

Browse files
tecon-mthsdenx
authored andcommitted
cmd: ubi: Fix 'ubi list' command arguments parsing
This fixes allowed argc variable value for arguments parsing Fixes: 6de1daf ("cmd: ubi: Add 'ubi list' command") Signed-off-by: Dmitry Dunaev <[email protected]>
1 parent 832148f commit 34031e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/ubi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
653653

654654
if (strcmp(argv[1], "list") == 0) {
655655
int numeric = 0;
656-
if (argc >= 2 && argv[2][0] == '-') {
656+
if (argc >= 3 && argv[2][0] == '-') {
657657
if (strcmp(argv[2], "-numeric") == 0)
658658
numeric = 1;
659659
else

0 commit comments

Comments
 (0)