cmd: ubi: Fix 'ubi list' command arguments parsing
PATCH 1/1 cmd: ubi: Fix 'ubi list' command arguments parsing
This fixes allowed argc variable value for arguments parsing
Fixes 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command")
Signed-off-by Dmitry Dunaev <[email protected]>
--- cmd/ubi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/ubi.c +1 -1
@@ -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
Signature · 1 line
2.34.1
Hello Dmitry,
Quoted 7 lines · Dmitry Dunaev
This fixes allowed argc variable value for arguments parsing
Fixes 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command")Signed-off-by Dmitry Dunaev <[email protected]>--- cmd/ubi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-ubi master
thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]