[PATCH 07/29] barriers: Don't allow destroying other client's barriers

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 11 23:19:00 PST 2012


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xi/xibarriers.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index f16094d..86e811e 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -534,6 +534,9 @@ XIDestroyPointerBarrier(ClientPtr client,
         return err;
     }
 
+    if (CLIENT_ID(stuff->barrier) != client->index)
+        return BadAccess;
+
     FreeResource(stuff->barrier, RT_NONE);
     return Success;
 }
-- 
1.8.0.1



More information about the xorg-devel mailing list