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:
+1
-1
@@ -829,7 +829,7 @@ handle_primary_client_destroyed(struct wl_listener *listener, void *data)
|
|||||||
static int
|
static int
|
||||||
weston_create_listening_socket(struct wl_display *display, const char *socket_name)
|
weston_create_listening_socket(struct wl_display *display, const char *socket_name)
|
||||||
{
|
{
|
||||||
char name_candidate[16];
|
char name_candidate[32];
|
||||||
|
|
||||||
if (socket_name) {
|
if (socket_name) {
|
||||||
if (wl_display_add_socket(display, socket_name)) {
|
if (wl_display_add_socket(display, socket_name)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user