summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-03-31 18:05:14 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-03-31 18:05:14 +0000
commit56481a46bfda683fd61b9726b4d703b53563b7fa (patch)
treebe9260615acf39c9a659fb0a299d66d33d62a0db /status.c
parent41f90bd08fb760f236857e7b22b89ebb2ffc106d (diff)
Don't accept keys with modifiers as input. Fixes crash reported by Brian
R Landy.
Diffstat (limited to 'status.c')
-rw-r--r--status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/status.c b/status.c
index 1d7c8ea1..b3ae78ce 100644
--- a/status.c
+++ b/status.c
@@ -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);