fix out-of-bounds access to consumed[]

This commit is contained in:
save196
2026-11-09 22:25:17 +02:00
parent 8ab0c16f3c
commit 86a30c4af2
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -279,7 +279,7 @@ client_notify_enter(struct wlr_surface *s, struct wlr_keyboard *kb)
}
for (size_t i = 0; i < kb->num_keycodes; i++) {
uint32_t key = kb->keycodes[i];
if (!consumed[key])
if (key >= LENGTH(consumed) || !consumed[key])
filtered[size++] = key;
}
wlr_seat_keyboard_notify_enter(seat, s, filtered, size, &kb->modifiers);