summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/login_ok.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libutil/login_ok.c b/lib/libutil/login_ok.c
index 365528b..4c4724e 100644
--- a/lib/libutil/login_ok.c
+++ b/lib/libutil/login_ok.c
@@ -101,7 +101,7 @@ login_timelist(login_cap_t *lc, char const *cap, int *ltno,
;
if (*ltno >= j)
lt = *ltptr;
- else if ((lt = realloc(*ltptr, j)) != NULL) {
+ else if ((lt = realloc(*ltptr, j * sizeof(struct login_time))) != NULL) {
*ltno = j;
*ltptr = lt;
}
@@ -188,7 +188,7 @@ login_hostok(login_cap_t *lc, const char *host, const char *ip,
rc = 0; /* host or IP not in allow list */
else {
- hl = login_getcaplist(lc, "host.deny", NULL);
+ hl = login_getcaplist(lc, denycap, NULL);
if (hl != NULL && login_str2inlist(hl, host, ip, FNM_CASEFOLD))
rc = 0; /* host or IP in deny list */
}
OpenPOWER on IntegriCloud