diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-03-24 16:24:37 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-03-24 16:24:37 +0000 |
commit | 38adbdec611b10f10ec7255d06d31f2b4ededf96 (patch) | |
tree | 4d0b728bccc846f57c1fc2d08e957e274e86f1d3 /usr.sbin/syslogd/ttymsg.c | |
parent | 34880692ac845a7fd45cacdf43b75e736e451d62 (diff) |
Replace bcopy(3) with memmove(3) in function ttymsg(). Values of
iov and localiov may overlap. No more bcopy(3) in syslogd(8).
from Michael W. Bombardieri
Diffstat (limited to 'usr.sbin/syslogd/ttymsg.c')
-rw-r--r-- | usr.sbin/syslogd/ttymsg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/syslogd/ttymsg.c b/usr.sbin/syslogd/ttymsg.c index 903bfc746fd..4d35e65ef1f 100644 --- a/usr.sbin/syslogd/ttymsg.c +++ b/usr.sbin/syslogd/ttymsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymsg.c,v 1.12 2017/03/16 12:14:37 bluhm Exp $ */ +/* $OpenBSD: ttymsg.c,v 1.13 2017/03/24 16:24:36 bluhm Exp $ */ /* $NetBSD: ttymsg.c,v 1.3 1994/11/17 07:17:55 jtc Exp $ */ /* @@ -115,7 +115,7 @@ ttymsg(struct iovec *iov, int iovcnt, char *utline) break; left -= wret; if (iov != localiov) { - bcopy(iov, localiov, + memmove(localiov, iov, iovcnt * sizeof(struct iovec)); iov = localiov; } @@ -141,7 +141,7 @@ ttymsg(struct iovec *iov, int iovcnt, char *utline) } logdebug("ttymsg delayed write\n"); if (iov != localiov) { - bcopy(iov, localiov, + memmove(localiov, iov, iovcnt * sizeof(struct iovec)); iov = localiov; } |