aboutsummaryrefslogtreecommitdiff
path: root/apps/wm.c
diff options
context:
space:
mode:
authorMarvin Borner2021-02-26 18:40:37 +0100
committerMarvin Borner2021-02-26 18:40:37 +0100
commit5cd84ad93f7d67cdaa134707fcce1b1ef85183ad (patch)
tree777ccbcf3034f96a013c402cf05ad23c35b4de0e /apps/wm.c
parent0f00932955521c3c2fb8140176ab72f22172c298 (diff)
Full UBSan support - many fixes!
Diffstat (limited to 'apps/wm.c')
-rw-r--r--apps/wm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/wm.c b/apps/wm.c
index abbb2bd..a9f22d5 100644
--- a/apps/wm.c
+++ b/apps/wm.c
@@ -251,6 +251,9 @@ static void handle_event_keyboard(struct event_keyboard *event)
else if (event->scancode == KEY_LEFTCTRL || event->scancode == KEY_RIGHTCTRL)
special_keys.ctrl ^= 1;
+ if (event->scancode > KEYMAP_LENGTH)
+ return;
+
char ch;
if (special_keys.shift)
ch = keymap->shift_map[event->scancode];