summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2016-05-13 08:58:58 +0200
committerAdam Jackson <ajax@redhat.com>2016-06-13 16:06:05 -0400
commit941aeb3b92e644923bd112eef8023f033a140ee6 (patch)
tree764db1ebb42155625c33554638d8e33efa3e639c /randr
parent6a6bbc3b756706bdade01434f1ee8d8cbe7dd854 (diff)
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 <ajax@redhat.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'randr')
-rw-r--r--randr/rrscreen.c3
1 files changed, 3 insertions, 0 deletions
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 +