mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-15 11:33:18 +00:00
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 <daniels@collabora.com>
This commit is contained in:
parent
cdfe94b105
commit
f48cf18a16
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue