summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-03-31 18:05:14 +0000
committernicm <nicm@openbsd.org>2010-03-31 18:05:14 +0000
commit4777d272e2c9119b52d49537f4f05b1f2507cf38 (patch)
tree5e40ffb621136df14e2351a460c334634dc91422
parentput date(1) onto the media, it fits (diff)
downloadwireguard-openbsd-4777d272e2c9119b52d49537f4f05b1f2507cf38.tar.xz
wireguard-openbsd-4777d272e2c9119b52d49537f4f05b1f2507cf38.zip
Don't accept keys with modifiers as input. Fixes crash reported by Brian
R Landy.
-rw-r--r--usr.bin/tmux/status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 8ba41108f70..6b2b5c2002c 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.60 2010/03/27 15:06:40 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.61 2010/03/31 18:05:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1046,7 +1046,7 @@ status_prompt_key(struct client *c, int key)
status_prompt_clear(c);
break;
case MODEKEY_OTHER:
- if (key < 32 || key == 127)
+ if ((key & 0xff00) != 0 || key < 32 || key == 127)
break;
c->prompt_buffer = xrealloc(c->prompt_buffer, 1, size + 2);