summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-06 22:25:28 +1000
committerKeith Packard <keithp@keithp.com>2009-05-08 22:50:56 -0700
commitb575af88d0e547a03b164f6f3b2d4b268b9ffc34 (patch)
treee4c67bf8b97079e51f1fcbcd23033b8855e7bc10 /Xi
parent9c643b1e3ddc4ec9f1a924bd25f24df8536c7ea6 (diff)
Xi: fix copy/paste error causing sizeof against wrong struct.
This wrong check may cause BadLength to be returned to the client even if the length is correct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 8b583ca2b21155359c6255f406c96599b277c762) Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/xiproperty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 26af3fc00..04b2c8112 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -650,7 +650,7 @@ ProcXChangeDeviceProperty (ClientPtr client)
return BadValue;
}
len = stuff->nUnits;
- if (len > ((0xffffffff - sizeof(xChangePropertyReq)) >> 2))
+ if (len > ((0xffffffff - sizeof(xChangeDevicePropertyReq)) >> 2))
return BadLength;
sizeInBytes = format>>3;
totalSize = len * sizeInBytes;