diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-11 12:31:40 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-11 13:42:50 +1000 |
commit | 5043f42f36b49e7702d0c496dd4fe157788d44ee (patch) | |
tree | 2b757a518f3e7621f4b0f069ceed0dc013465b2f /Xi | |
parent | fcf0c0b8f332cbde03c1a479376b7913197962eb (diff) |
Xi: correct return buffer size for XIGetSelectedEvents.
The maximum number of bytes is calculated by the mask len, and the mask len
is always in 4-byte units. XI2MASKSIZE however is in bytes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/xiselectev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index cafb97641..f2c6b9a04 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -202,7 +202,7 @@ ProcXIGetSelectedEvents(ClientPtr client) return Success; } - buffer = xcalloc(MAXDEVICES, sizeof(xXIEventMask) + XI2MASKSIZE); + buffer = xcalloc(MAXDEVICES, sizeof(xXIEventMask) + ((XI2MASKSIZE + 3)/4) * 4); if (!buffer) return BadAlloc; |