From 85a87ebbacdf3b81734deab1bc94e871546ed090 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 15 Jan 2025 09:40:34 +0100 Subject: [PATCH] os/connection: Make sure partial is initialized Following the change in Xtrans 1.5 that allows for partial connections to succeed, we need to make sure partial is properly initialized at first, otherwise we rely on an uninitialized variable. Signed-off-by: Olivier Fourdan Suggested-by: Twaik Yont Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1783 Part-of: (cherry picked from commit 080fb49eff4de7ec3a29214994d1403e4d877f6a) --- os/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/connection.c b/os/connection.c index 52b809c65..89cd4c329 100644 --- a/os/connection.c +++ b/os/connection.c @@ -236,7 +236,7 @@ void CreateWellKnownSockets(void) { int i; - int partial; + int partial = 0; /* display is initialized to "0" by main(). It is then set to the display * number if specified on the command line. */