From 941aeb3b92e644923bd112eef8023f033a140ee6 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 13 May 2016 08:58:58 +0200 Subject: [PATCH] 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 --- randr/rrscreen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/randr/rrscreen.c b/randr/rrscreen.c index d0ca91e0e..b5e2090d9 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -41,6 +41,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 +