Avoid overrunning array when registering pki command line options
This commit is contained in:
parent
911e3156a0
commit
8b0dce08f2
|
@ -144,7 +144,7 @@ void command_register(command_t command)
|
||||||
/* append default options, but not to --help */
|
/* append default options, but not to --help */
|
||||||
if (!active)
|
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)
|
if (cmds[registered].options[i].name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue