From 408e2a77e9fe49b6753261e8e96d80fd579571c0 Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 27 Nov 2018 23:18:12 +0100 Subject: [PATCH] backend/wayland: fix zero-length VLA --- backend/wayland/wl_seat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c index c4098987..b654197a 100644 --- a/backend/wayland/wl_seat.c +++ b/backend/wayland/wl_seat.c @@ -203,7 +203,7 @@ static void keyboard_handle_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t time = get_current_time_msec(); - uint32_t pressed[dev->keyboard->num_keycodes]; + uint32_t pressed[dev->keyboard->num_keycodes + 1]; memcpy(pressed, dev->keyboard->keycodes, dev->keyboard->num_keycodes * sizeof(uint32_t));