mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user