From 56f5f0cf085ca6a00a71830044e1ee1badff26ac Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 23 Jan 2014 16:30:07 +0000 Subject: [PATCH] sna: Protect against fake CRTCs during initial probe Reported-by: Nick Bowler Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73981 Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 9e811ca..8751a34 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3492,7 +3492,9 @@ static bool sna_probe_initial_configuration(struct sna *sna) for (j = 0; j < config->num_crtc; j++) { xf86CrtcPtr crtc = config->crtc[j]; - if (to_sna_crtc(crtc)->id != crtc_id) + + if (to_sna_crtc(crtc) == NULL || + to_sna_crtc(crtc)->id != crtc_id) continue; if (crtc->desiredMode.status == MODE_OK) { -- 1.8.5.3