summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-03-10 16:07:09 +1000
committerDave Airlie <airlied@redhat.com>2010-03-10 16:07:09 +1000
commit3ae6a3779d9040a4d7c3e1b7901117e24e0d3ecf (patch)
tree99cc24faf028c3fbbd65f43ffe93a81a2e93f4a3
parent1242e494c8abc25d51fa0f8120ba353ffcf7be08 (diff)
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@redhat.com>
-rw-r--r--hw/xfree86/dri2/dri2.c2
1 files changed, 1 insertions, 1 deletions
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;