Avoid overrunning array when registering pki command line options

This commit is contained in:
Tobias Brunner 2012-09-28 18:22:54 +02:00
parent 911e3156a0
commit 8b0dce08f2
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ void command_register(command_t command)
/* append default options, but not to --help */
if (!active)
{
for (i = 0; i < countof(cmds[registered].options); i++)
for (i = 0; i < countof(cmds[registered].options) - 1; i++)
{
if (cmds[registered].options[i].name)
{