Skip to contentSkip to conversation

cmd: ubi: Fix 'ubi list' command arguments parsing

PATCH In review Dmitry Dunaev 2 participants 2 messages Jul 12, 2023 – Aug 15, 2023

lore
Share & tools
lore
#0 lore raw

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")
---
 cmd/ubi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/ubi.c +1 -1
index b61ae1efea..0a6a80bdd1 100644
@@ -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
#1 lore raw

Hello Dmitry,

Quoted 7 lines · Dmitry Dunaev

This fixes allowed argc variable value for arguments parsing

Fixes 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command")
---
 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]