pki: Also check for MAX_COMMANDS when building getopt_long arguments
Completes87e53819a6
and0a8c399a21
.
This commit is contained in:
parent
d82aa931db
commit
bb91109af8
|
@ -73,7 +73,7 @@ static void build_opts()
|
|||
memset(command_optstring, 0, sizeof(command_optstring));
|
||||
if (active == help_idx)
|
||||
{
|
||||
for (i = 0; cmds[i].cmd; i++)
|
||||
for (i = 0; i < MAX_COMMANDS && cmds[i].cmd; i++)
|
||||
{
|
||||
command_opts[i].name = cmds[i].cmd;
|
||||
command_opts[i].val = cmds[i].op;
|
||||
|
|
Loading…
Reference in New Issue