Avoid overrunning array when registering pki command line options
This commit is contained in:
+1
-1
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user