From a14e1a59a4025cbb464b5deeed0f50d5a2898b0c Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 17 Mar 2021 21:16:26 +0100 Subject: randr: Do not update ConnectionInfo if NULL Backport of this xorg-xserver commit: commit 941aeb3b92e644923bd112eef8023f033a140ee6 Author: Olivier Fourdan Date: Fri May 13 08:58:58 2016 +0200 randr: Do not update ConnectionInfo if NULL RRScreenSizeNotify() will update the connection information block, but if this occurs during initialization before ConnectionInfo is even initialized, this will lead to a crash. Simply check for ConnectionInfo prior to update it to avoid the crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan Fixes ArcticaProject/nx-libs#1009 --- nx-X11/programs/Xserver/randr/rrscreen.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/randr/rrscreen.c b/nx-X11/programs/Xserver/randr/rrscreen.c index 4f59e9aea..90371704a 100644 --- a/nx-X11/programs/Xserver/randr/rrscreen.c +++ b/nx-X11/programs/Xserver/randr/rrscreen.c @@ -66,6 +66,9 @@ RREditConnectionInfo(ScreenPtr pScreen) int screen = 0; int d; + if (ConnectionInfo == NULL) + return; + connSetup = (xConnSetup *) ConnectionInfo; vendor = (char *) connSetup + sizeof(xConnSetup); formats = (xPixmapFormat *) ((char *) vendor + -- cgit v1.2.3