[PATCH] Xi: fix modifier offset in XIPassiveGrab swapping function
Alan Coopersmith
alan.coopersmith at oracle.com
Thu Jan 23 23:00:58 PST 2014
On 01/23/14 10:53 PM, Peter Hutterer wrote:
> The request is followed by mask_len 4-byte units, then followed by the actual
> modifiers.
>
> Reported-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> Xi/xipassivegrab.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
> index eccec0a..8aba977 100644
> --- a/Xi/xipassivegrab.c
> +++ b/Xi/xipassivegrab.c
> @@ -63,7 +63,7 @@ SProcXIPassiveGrabDevice(ClientPtr client)
> swaps(&stuff->mask_len);
> swaps(&stuff->num_modifiers);
>
> - mods = (uint32_t *) &stuff[1];
> + mods = (uint32_t *) &stuff[1] + stuff->mask_len;
>
> for (i = 0; i < stuff->num_modifiers; i++, mods++) {
> swapl(mods);
>
Matches the math in the unswapped function, and my reading of what
libXi sends from the client, so:
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list