xserver: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Thu Jun 4 19:02:00 PDT 2009


 hw/xfree86/modes/xf86Crtc.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit b6c16fc7dad5a4ffcaaab647c0e3fabed372efd5
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jun 5 11:57:39 2009 +1000

    crtc/gamma: check xf86_config is valid before using it.
    
    If you have multiple cards, some that support randr 1.2 and some that don't
    you can get a null dereference in here.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 0ab2f3d..b40e096 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3140,6 +3140,9 @@ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
 	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 	xf86CrtcPtr crtc;
 
+	/* for multiple drivers loaded we need this */
+	if (!xf86_config)
+		return FALSE;
 	if (xf86_config->num_crtc == 0)
 	    return FALSE;
 	crtc = xf86_config->crtc[0];


More information about the xorg-commit mailing list