summaryrefslogtreecommitdiff
path: root/Xi/xipassivegrab.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-05 10:15:04 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-05 16:09:09 +1000
commit2b459f44f3edaea137df9a28bc7adfeb1b9f1df7 (patch)
tree5ff76082d0d87205df3e553bccf0841c3996923e /Xi/xipassivegrab.c
parentc77f42049f77417c68bbce3dd2e995d916fc5af5 (diff)
Xi: return BadImplementation for deviceids 256 and above
The protocol allows for 16 bit device ids, but the implementation doesn't yet. We need to break the input ABI once more to shift the DeviceIntRec's CARD8 to a CARD16, along with some changes in the privates. Once that is done, revert this patch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/xipassivegrab.c')
-rw-r--r--Xi/xipassivegrab.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 0c74544e4..25ecc035c 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -90,6 +90,9 @@ ProcXIPassiveGrabDevice(ClientPtr client)
REQUEST(xXIPassiveGrabDeviceReq);
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
+ if (stuff->deviceid > 0xFF) /* FIXME */
+ return BadImplementation;
+
if (stuff->deviceid == XIAllDevices)
dev = inputInfo.all_devices;
else if (stuff->deviceid == XIAllMasterDevices)
@@ -260,6 +263,12 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
REQUEST(xXIPassiveUngrabDeviceReq);
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
+ if (stuff->deviceid > 0xFF) /* FIXME */
+ {
+ client->errorValue = stuff->deviceid;
+ return BadImplementation;
+ }
+
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
if (rc != Success)
return rc;