diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2010-03-31 18:24:08 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2010-03-31 18:24:08 +0000 |
commit | 1392fba63dfb9f5449a497ec7f8038d45beb8ad5 (patch) | |
tree | 3ea4ed3e2f52b23cc1d55d8d382f29e8450736cb | |
parent | 1c6ab725f5828f931a979f77b7be1c22000f0ea8 (diff) | |
download | rtmux-1392fba63dfb9f5449a497ec7f8038d45beb8ad5.tar.gz rtmux-1392fba63dfb9f5449a497ec7f8038d45beb8ad5.tar.bz2 rtmux-1392fba63dfb9f5449a497ec7f8038d45beb8ad5.zip |
Don't accept keys with modifiers as input. Fixes crash reported by Brian
R Landy.
-rw-r--r-- | status.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.145 2010-03-27 15:12:56 nicm Exp $ */ +/* $Id: status.c,v 1.146 2010-03-31 18:24:08 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); |