diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-05 10:15:04 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-05 16:09:09 +1000 |
commit | 2b459f44f3edaea137df9a28bc7adfeb1b9f1df7 (patch) | |
tree | 5ff76082d0d87205df3e553bccf0841c3996923e /Xi/xiproperty.c | |
parent | c77f42049f77417c68bbce3dd2e995d916fc5af5 (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/xiproperty.c')
-rw-r--r-- | Xi/xiproperty.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index cd4946026..dc54d10fe 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -1102,6 +1102,12 @@ ProcXIListProperties(ClientPtr client) REQUEST(xXIListPropertiesReq); REQUEST_SIZE_MATCH(xXIListPropertiesReq); + if (stuff->deviceid > 0xFF) /* FIXME */ + { + client->errorValue = stuff->deviceid; + return BadImplementation; + } + rc = dixLookupDevice (&dev, stuff->deviceid, client, DixReadAccess); if (rc != Success) return rc; @@ -1136,6 +1142,12 @@ ProcXIChangeProperty(ClientPtr client) REQUEST(xXIChangePropertyReq); REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); + + if (stuff->deviceid > 0xFF) /* FIXME */ + { + client->errorValue = stuff->deviceid; + return BadImplementation; + } UpdateCurrentTime(); rc = dixLookupDevice (&dev, stuff->deviceid, client, DixWriteAccess); @@ -1164,6 +1176,13 @@ ProcXIDeleteProperty(ClientPtr client) REQUEST(xXIDeletePropertyReq); REQUEST_SIZE_MATCH(xXIDeletePropertyReq); + + if (stuff->deviceid > 0xFF) /* FIXME */ + { + client->errorValue = stuff->deviceid; + return BadImplementation; + } + UpdateCurrentTime(); rc = dixLookupDevice (&dev, stuff->deviceid, client, DixWriteAccess); if (rc != Success) @@ -1192,6 +1211,13 @@ ProcXIGetProperty(ClientPtr client) Atom type; REQUEST_SIZE_MATCH(xXIGetPropertyReq); + + if (stuff->deviceid > 0xFF) /* FIXME */ + { + client->errorValue = stuff->deviceid; + return BadImplementation; + } + if (stuff->delete) UpdateCurrentTime(); rc = dixLookupDevice (&dev, stuff->deviceid, client, |