From 0b6bb91adf7e4c4048d39cfad25c2451da692bbd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 3 Oct 2018 17:06:12 +0200 Subject: wall: make sure line is zero terminated Signed-off-by: Karel Zak --- term-utils/wall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'term-utils') diff --git a/term-utils/wall.c b/term-utils/wall.c index f57c0835c..48e654ac6 100644 --- a/term-utils/wall.c +++ b/term-utils/wall.c @@ -259,7 +259,7 @@ int main(int argc, char **argv) if (group_buf && !is_gr_member(utmpptr->ut_user, group_buf)) continue; - xstrncpy(line, utmpptr->ut_line, sizeof(utmpptr->ut_line)); + mem2strcpy(line, utmpptr->ut_line, sizeof(utmpptr->ut_line), sizeof(line)); if ((p = ttymsg(&iov, 1, line, timeout)) != NULL) warnx("%s", p); } -- cgit v1.2.3-55-g7522