mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-21 11:50:44 +01:00
Xi: fix XI2 passive grab reply length calculation
If modifiers failed, the reply length was 4 bytes too short.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 33fee13361)
This commit is contained in:
parent
09f6d85b5b
commit
a96fd08b40
1 changed files with 2 additions and 2 deletions
|
|
@ -194,7 +194,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
info->status = status;
|
||||
info->modifiers = *modifiers;
|
||||
rep.num_modifiers++;
|
||||
rep.length++;
|
||||
rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
if (rep.num_modifiers)
|
||||
{
|
||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
||||
WriteSwappedDataToClient(client, rep.num_modifiers * 4, (char*)modifiers_failed);
|
||||
WriteSwappedDataToClient(client, rep.length * 4, (char*)modifiers_failed);
|
||||
}
|
||||
free(modifiers_failed);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue