summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pts.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-02-28 14:20:26 +0000
committered <ed@FreeBSD.org>2009-02-28 14:20:26 +0000
commit51d425ac0e9404969edd449f9538d8d5b5d6541b (patch)
tree59f30355fa196ac09798c114dc5150840d387ece /sys/kern/tty_pts.c
parentb342cbbd7afd2f2831b83817093c7f75c25d4b4d (diff)
downloadFreeBSD-src-51d425ac0e9404969edd449f9538d8d5b5d6541b.zip
FreeBSD-src-51d425ac0e9404969edd449f9538d8d5b5d6541b.tar.gz
Replace bcopy() calls inside the TTY layer with memcpy()/strlcpy().
In all these cases the buffers never overlap. Program names are also likely to be shorter, so use a regular strlcpy() to copy p_comm.
Diffstat (limited to 'sys/kern/tty_pts.c')
-rw-r--r--sys/kern/tty_pts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c
index 3f8db33..cef9866 100644
--- a/sys/kern/tty_pts.c
+++ b/sys/kern/tty_pts.c
@@ -310,7 +310,7 @@ ptsdev_ioctl(struct file *fp, u_long cmd, void *data,
case TIOCGETA:
/* Obtain terminal flags through tcgetattr(). */
tty_lock(tp);
- bcopy(&tp->t_termios, data, sizeof(struct termios));
+ memcpy(data, &tp->t_termios, sizeof(struct termios));
tty_unlock(tp);
return (0);
#endif /* PTS_LINUX */
OpenPOWER on IntegriCloud