From b41db8fe460fc0956922b79261752d1bb104684f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 Sep 2009 08:57:40 +1000 Subject: Xi: fix broken swap code in XISelectEvents request processing. The pointer advanced 12 bytes too short. Rather unfortunate if both the code and the test have the same bug. Signed-off-by: Peter Hutterer --- Xi/xiselectev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Xi/xiselectev.c') diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index d4f5faa7c..16eada7c8 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -73,7 +73,7 @@ SProcXISelectEvents(ClientPtr client) { swaps(&evmask->deviceid, n); swaps(&evmask->mask_len, n); - evmask = (xXIEventMask*)(((char*)evmask) + evmask->mask_len * 4); + evmask = (xXIEventMask*)(((char*)&evmask[1]) + evmask->mask_len * 4); } return (ProcXISelectEvents(client)); -- cgit v1.2.3