diff options
Diffstat (limited to 'src/lib/keytab.c')
-rw-r--r-- | src/lib/keytab.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/keytab.c b/src/lib/keytab.c index c2842c9..ff32e42 100644 --- a/src/lib/keytab.c +++ b/src/lib/keytab.c @@ -12,6 +12,8 @@ static char **getkv(char *pair); int *getkeys(tablist_t *list, int id) { int len = 2; + if (id >= list[0].len) + return NULL; int *indexes = calloc(len, sizeof(int)); for (int i = 0, j = 0; i < TABLEN; ++i) { if (j >= len) { |