#include "charfuncs.h"
#include "keydb.h"
#include "keyid.h"
-#include "keyindex.h"
+#include "decodekey.h"
#include "keystructs.h"
#include "mem.h"
#include "onak-conf.h"
llfree(wordlist, NULL);
wordlist = NULL;
- for (newkeylist = keylist; newkeylist != NULL;
+ for (newkeylist = keylist;
+ newkeylist != NULL && numkeys < config.maxkeys;
newkeylist = newkeylist->next) {
keyid = 0;