diff options
author | Dmitry Dunaev <dunaev@tecon.ru> | 2023-07-12 15:58:21 +0300 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2023-08-15 07:32:13 +0200 |
commit | 34031e9cce91de323ed711d7e8614c0d12fada1c (patch) | |
tree | 5647e4f6dd7ef3236f080a7728a7d70bae504e4c | |
parent | 832148f675e427060be074c276956962fa9b5cb6 (diff) | |
download | u-boot-34031e9cce91de323ed711d7e8614c0d12fada1c.tar.gz u-boot-34031e9cce91de323ed711d7e8614c0d12fada1c.tar.bz2 u-boot-34031e9cce91de323ed711d7e8614c0d12fada1c.zip |
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 <dunaev@tecon.ru>
-rw-r--r-- | cmd/ubi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |