From fefafda9a0926f125f0d07f6c20fe86381e2f151 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 12 Dec 2022 21:26:54 +0530 Subject: [PATCH] Fix #5764 --- glfw/wl_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 2ce48fb2b..75e425cb6 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -75,7 +75,7 @@ get_activation_token( if (token == NULL) fail("Wayland: failed to create activation request token"); if (_glfw.wl.activation_requests.capacity < _glfw.wl.activation_requests.sz + 1) { _glfw.wl.activation_requests.capacity = MAX(64u, _glfw.wl.activation_requests.capacity * 2); - _glfw.wl.activation_requests.array = realloc(_glfw.wl.activation_requests.array, _glfw.wl.activation_requests.capacity); + _glfw.wl.activation_requests.array = realloc(_glfw.wl.activation_requests.array, _glfw.wl.activation_requests.capacity * sizeof(_glfw.wl.activation_requests.array[0])); if (!_glfw.wl.activation_requests.array) { _glfw.wl.activation_requests.capacity = 0; fail("Wayland: Out of memory while allocation activation request");