Message ID | 20230712125821.41233-1-dunaev@tecon.ru |
---|---|
State | Accepted |
Commit | 34031e9cce91de323ed711d7e8614c0d12fada1c |
Delegated to: | Heiko Schocher |
Headers | show |
Series | cmd: ubi: Fix 'ubi list' command arguments parsing | expand |
Hello Dmitry, On 12.07.23 14:58, Dmitry Dunaev wrote: > This fixes allowed argc variable value for arguments parsing > > Fixes: 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command") > Signed-off-by: Dmitry Dunaev <dunaev@tecon.ru> > --- > cmd/ubi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-ubi master thanks! bye, Heiko
diff --git a/cmd/ubi.c b/cmd/ubi.c index b61ae1efea..0a6a80bdd1 100644 --- a/cmd/ubi.c +++ b/cmd/ubi.c @@ -653,7 +653,7 @@ static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (strcmp(argv[1], "list") == 0) { int numeric = 0; - if (argc >= 2 && argv[2][0] == '-') { + if (argc >= 3 && argv[2][0] == '-') { if (strcmp(argv[2], "-numeric") == 0) numeric = 1; else
This fixes allowed argc variable value for arguments parsing Fixes: 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command") Signed-off-by: Dmitry Dunaev <dunaev@tecon.ru> --- cmd/ubi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)