mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-07 00:01:49 -04:00
pki: Also check for MAX_COMMANDS when building getopt_long arguments
Completes 87e53819a6 and 0a8c399a21.
This commit is contained in:
parent
d82aa931db
commit
bb91109af8
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user