From f48cf18a1624561d544bdf1b0e22cd4829ae4023 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 29 Mar 2022 15:35:58 +0100 Subject: [PATCH] compositor: Fix harmless potential buffer overflow We could overflow a local buffer if there were more than ten million concurrently active displays within the current user's session. This seems vanishingly unlikely, and harmless, but does at least squash a compiler warning emitted by gcc 12+. Signed-off-by: Daniel Stone --- compositor/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compositor/main.c b/compositor/main.c index 91b3d43f..56de28d0 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -829,7 +829,7 @@ handle_primary_client_destroyed(struct wl_listener *listener, void *data) static int weston_create_listening_socket(struct wl_display *display, const char *socket_name) { - char name_candidate[16]; + char name_candidate[32]; if (socket_name) { if (wl_display_add_socket(display, socket_name)) {