summaryrefslogtreecommitdiffstats
path: root/usr.bin/wall
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-03-05 14:10:15 +0000
committerache <ache@FreeBSD.org>2001-03-05 14:10:15 +0000
commitc100d489dd3d12409a23b348647f39e56ae6bb42 (patch)
treef3eba73823b3e28392e0540ce6a4004116be137a /usr.bin/wall
parent87e2157eb3180ba20c7e96c16d4897a2b2ccf444 (diff)
downloadFreeBSD-src-c100d489dd3d12409a23b348647f39e56ae6bb42.zip
FreeBSD-src-c100d489dd3d12409a23b348647f39e56ae6bb42.tar.gz
Fix ttynames generation broken with strlcat
PR: 25541 Submitted by: Nickolay Dudorov <nnd@mail.nsk.ru>
Diffstat (limited to 'usr.bin/wall')
-rw-r--r--usr.bin/wall/ttymsg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c
index 3dccfbc..c65cfe8 100644
--- a/usr.bin/wall/ttymsg.c
+++ b/usr.bin/wall/ttymsg.c
@@ -71,7 +71,7 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout)
if (iovcnt > sizeof(localiov) / sizeof(localiov[0]))
return ("too many iov's (change code in wall/ttymsg.c)");
- strlcat(device, line, sizeof(device));
+ strlcpy(device + sizeof(_PATH_DEV) - 1, line, sizeof(device));
if (strchr(device + sizeof(_PATH_DEV) - 1, '/')) {
/* A slash is an attempt to break security... */
(void) snprintf(errbuf, sizeof(errbuf),
OpenPOWER on IntegriCloud