Xi: fix length field in XIQueryPointer.
Buttons append 4-byte units to the end of the reply, they need to be included too. Reported-by: Mark Dokter Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
33fcaaaea5
commit
b89dcfbfbd
|
@ -127,6 +127,7 @@ ProcXIQueryPointer(ClientPtr client)
|
|||
{
|
||||
int i, down;
|
||||
rep.buttons_len = ((pDev->button->numButtons/8) + 3)/4;
|
||||
rep.length += rep.buttons_len;
|
||||
buttons = xcalloc(rep.buttons_len, 4);
|
||||
if (!buttons)
|
||||
return BadAlloc;
|
||||
|
|
Loading…
Reference in New Issue
Block a user