diff options
Diffstat (limited to 'usr.bin/wall/ttymsg.c')
-rw-r--r-- | usr.bin/wall/ttymsg.c | 2 |
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), |