summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-05-12 13:29:06 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-05-12 13:29:06 +0000
commit026bf85986a1f6770c260769de50988ab7cda210 (patch)
tree305f2703690d93d97b330ac07419069e4caa820c /usr.bin
parentd0d7ff445478ddce290f41b7384dcc06d9bc09bb (diff)
Need to clear tty context before using it.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/screen-write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index 7130af3a60b..8b12e78a83f 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.122 2017/05/12 13:00:56 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.123 2017/05/12 13:29:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -390,6 +390,8 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx)
{
struct screen *s = ctx->s;
+ memset(ttyctx, 0, sizeof *ttyctx);
+
ttyctx->wp = ctx->wp;
ttyctx->ocx = s->cx;