summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/terminal-unix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index 19e2caf7b2..9b1e3d21fe 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -87,6 +87,9 @@ static char *term_smkx = NULL;
#endif
static keycode_st *keys_push(char *p, int code) {
+ if (strlen(p) > 8)
+ return NULL;
+
if (getch2_keys.len == getch2_keys.cap) {
getch2_keys.cap *= 2;
if (getch2_keys.cap == 0)