pki: When dispatching commands, don't look beyond non-null-terminated array

This commit is contained in:
Martin Willi 2014-03-19 09:34:41 +01:00
parent 87e53819a6
commit 0a8c399a21
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{