summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2012-04-22 02:26:11 +0000
committermatthew <matthew@openbsd.org>2012-04-22 02:26:11 +0000
commit3a09bc2de82ee16995367f43f11ef6b23c78797e (patch)
treeee20e01f22a120f61d4b3bdfbee825d68f5ec431
parentDocument that getpeereid() works for SOCK_SEQPACKET sockets too. (diff)
downloadwireguard-openbsd-3a09bc2de82ee16995367f43f11ef6b23c78797e.tar.xz
wireguard-openbsd-3a09bc2de82ee16995367f43f11ef6b23c78797e.zip
Reset t_column to 0 when initializing a tty.
ok deraadt@
-rw-r--r--sys/kern/tty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index df0c72e498c..906702d0285 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.94 2012/03/23 15:51:26 guenther Exp $ */
+/* $OpenBSD: tty.c,v 1.95 2012/04/22 02:26:11 matthew Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -181,6 +181,7 @@ ttyopen(dev_t device, struct tty *tp, struct proc *p)
if (!ISSET(tp->t_state, TS_ISOPEN)) {
SET(tp->t_state, TS_ISOPEN);
bzero(&tp->t_winsize, sizeof(tp->t_winsize));
+ tp->t_column = 0;
#ifdef COMPAT_OLDTTY
tp->t_flags = 0;
#endif