pki: Also check for MAX_COMMANDS when building getopt_long arguments
Completes87e53819a6and0a8c399a21.
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ static void build_opts()
|
|||||||
memset(command_optstring, 0, sizeof(command_optstring));
|
memset(command_optstring, 0, sizeof(command_optstring));
|
||||||
if (active == help_idx)
|
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].name = cmds[i].cmd;
|
||||||
command_opts[i].val = cmds[i].op;
|
command_opts[i].val = cmds[i].op;
|
||||||
|
|||||||
Reference in New Issue
Block a user