diff options
Diffstat (limited to 'login-utils/last.c')
-rw-r--r-- | login-utils/last.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/last.c b/login-utils/last.c index 80d77d20b..59dfdb2f5 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -395,7 +395,7 @@ static int list(const struct last_control *ctl, struct utmpx *p, time_t logout_t * uucp and ftp have special-type entries */ utline[0] = 0; - strncat(utline, p->ut_line, sizeof(p->ut_line)); + strncat(utline, p->ut_line, sizeof(utline) - 1); if (strncmp(utline, "ftp", 3) == 0 && isdigit(utline[3])) utline[3] = 0; if (strncmp(utline, "uucp", 4) == 0 && isdigit(utline[4])) |