summaryrefslogtreecommitdiffstats
path: root/login-utils/last.c
diff options
context:
space:
mode:
authorManuel Bentele2019-08-21 14:58:42 +0200
committerManuel Bentele2019-08-21 14:58:42 +0200
commit0692b963aa3cb846d8abab5ef5247c4dbb3fec96 (patch)
treef13776d25da3e1adc1445aef22e7566ac98cbe84 /login-utils/last.c
parentlosetup: added file format option to the man page (diff)
parentpartx: document -d vs. --nr and fix test (diff)
downloadkernel-qcow2-util-linux-0692b963aa3cb846d8abab5ef5247c4dbb3fec96.tar.gz
kernel-qcow2-util-linux-0692b963aa3cb846d8abab5ef5247c4dbb3fec96.tar.xz
kernel-qcow2-util-linux-0692b963aa3cb846d8abab5ef5247c4dbb3fec96.zip
lib/losetup: merge remote-tracking branch 'util-linux/master'kernel-qcow2
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
Diffstat (limited to 'login-utils/last.c')
-rw-r--r--login-utils/last.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/login-utils/last.c b/login-utils/last.c
index 2f7d9d48f..1b1a74191 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -394,8 +394,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(utline) - 1);
+ mem2strcpy(utline, p->ut_line, sizeof(p->ut_line), sizeof(utline));
if (strncmp(utline, "ftp", 3) == 0 && isdigit(utline[3]))
utline[3] = 0;
if (strncmp(utline, "uucp", 4) == 0 && isdigit(utline[4]))