pki: When dispatching commands, don't look beyond non-null-terminated array
This commit is contained in:
parent
87e53819a6
commit
0a8c399a21
|
@ -263,7 +263,7 @@ int command_dispatch(int c, char *v[])
|
|||
|
||||
build_opts();
|
||||
op = getopt_long(c, v, command_optstring, command_opts, NULL);
|
||||
for (i = 0; cmds[i].cmd; i++)
|
||||
for (i = 0; i < MAX_COMMANDS && cmds[i].cmd; i++)
|
||||
{
|
||||
if (cmds[i].op == op)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue