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:
Peter Hutterer 2009-05-18 16:07:08 +10:00
parent 33fcaaaea5
commit b89dcfbfbd

View File

@ -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;