[PATCH 4/4] Xi: fix querydevice request swapping
Julien Cristau
jcristau at debian.org
Fri Apr 1 14:23:30 PDT 2011
On Fri, Apr 1, 2011 at 23:05:43 +0200, Matthieu Herrb wrote:
> WriteReplyToClient() swaps rep.length, so it can't be used
> on return of WriteReplyToClient(). So save it's value for later
> use.
>
> Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
> ---
> Xi/xiquerydevice.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
> index 8b54211..670216c 100644
> --- a/Xi/xiquerydevice.c
> +++ b/Xi/xiquerydevice.c
> @@ -153,8 +153,9 @@ ProcXIQueryDevice(ClientPtr client)
> }
> }
>
> + len = rep.length*4;
spaces around *
> WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep);
> - WriteToClient(client, rep.length * 4, ptr);
> + WriteToClient(client, len, ptr);
> free(ptr);
> free(skip);
> return rc;
Reviewed-by: Julien Cristau <jcristau at debian.org>
Cheers,
Julien
More information about the xorg-devel
mailing list