From 3ae6a3779d9040a4d7c3e1b7901117e24e0d3ecf Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 10 Mar 2010 16:07:09 +1000 Subject: 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 --- hw/xfree86/dri2/dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index d15ced112..1cc7b63f1 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; -- cgit v1.2.3