summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-11-16 14:21:47 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-11-19 12:13:31 +1000
commit0ff1c77b17062a3a3ff520709ef719316bc1d8bb (patch)
tree65c5bcb46f3be8255aaf39a8bca407c39565b8ac
parentaa9a9ad08b8a6e7e95de7c2bf45d93dd50f9ca87 (diff)
xfixes: let PointerBarrierClient->device_ids point to allocated memory
"Fixed" up Jasper's original patch [1] to use pointers instead of zero-length arrays but didn't actually set the pointer to anywhere. [1] 9a536820f6174befb22431bab375ef1af0a1ec29 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-By: Jasper St. Pierre <jstpierre@mecheye.net>
-rw-r--r--xfixes/cursor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 7c223ddc5..bd175b40f 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -1300,6 +1300,10 @@ CreatePointerBarrierClient(ScreenPtr screen, ClientPtr client,
ret->screen = screen;
ret->num_devices = stuff->num_devices;
+ if (ret->num_devices > 0)
+ ret->device_ids = (int*)&ret[1];
+ else
+ ret->device_ids = NULL;
in_devices = (CARD16 *) &stuff[1];
for (i = 0; i < stuff->num_devices; i++) {