xserver: Branch 'server-1.7-branch'

Dave Airlie airlied at kemper.freedesktop.org
Tue Mar 9 22:08:14 PST 2010


 hw/xfree86/dri2/dri2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3ae6a3779d9040a4d7c3e1b7901117e24e0d3ecf
Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Mar 10 16:07:09 2010 +1000

    dri2: return FALSE not BadValue.
    
    With 1.7 if you try and send a DRI2Connect with this value set
    to anything but 0, the server will segfault due to the strlen
    in the function this returns to, since BadValue != FALSE.
    
    Fixed via other work in 1.8.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index d15ced1..1cc7b63 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -387,7 +387,7 @@ DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd,
 	return FALSE;
 
     if (driverType != DRI2DriverDRI)
-	return BadValue;
+	return FALSE;
 
     *fd = ds->fd;
     *driverName = ds->driverName;


More information about the xorg-commit mailing list