diff --git a/src/pki/command.c b/src/pki/command.c index 593ff37fb..415e78b10 100644 --- a/src/pki/command.c +++ b/src/pki/command.c @@ -140,6 +140,13 @@ void command_register(command_t command) { int i; + if (registered == MAX_COMMANDS) + { + fprintf(stderr, "unable to register command, please increase " + "MAX_COMMANDS\n"); + return; + } + cmds[registered] = command; /* append default options, but not to --help */ if (!active)