wall: make sure line is zero terminated
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
a338eb4a46
commit
0b6bb91adf
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue