mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-11-11 15:43:13 +00:00
fix out-of-bounds access to consumed[]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user