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 <[email protected]> --- 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; WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep); - WriteToClient(client, rep.length * 4, ptr); + WriteToClient(client, len, ptr); free(ptr); free(skip); return rc; -- 1.7.3.5 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
