From 9e0b75a70eb409954211a1fdd07a69d52c9b5b63 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Wed, 30 Nov 2022 15:09:31 +0900 Subject: [PATCH] Wayland: Fix a wrong array size for _GLFWofferWayland --- src/wl_window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wl_window.c b/src/wl_window.c index c4d097b7..a227c16f 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1640,7 +1640,8 @@ static void dataDeviceHandleDataOffer(void* userData, struct wl_data_offer* offer) { _GLFWofferWayland* offers = - _glfw_realloc(_glfw.wl.offers, _glfw.wl.offerCount + 1); + _glfw_realloc(_glfw.wl.offers, + sizeof(_GLFWofferWayland) * (_glfw.wl.offerCount + 1)); if (!offers) { _glfwInputError(GLFW_OUT_OF_MEMORY, NULL);