diff options
author | ed <ed@FreeBSD.org> | 2009-02-28 14:20:26 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-02-28 14:20:26 +0000 |
commit | 51d425ac0e9404969edd449f9538d8d5b5d6541b (patch) | |
tree | 59f30355fa196ac09798c114dc5150840d387ece /sys/kern/tty_pts.c | |
parent | b342cbbd7afd2f2831b83817093c7f75c25d4b4d (diff) | |
download | FreeBSD-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.c | 2 |
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 */ |