[PATCH] Xi: prohibit multiple XIQueryVersion requests with different versions
Peter Hutterer
peter.hutterer at who-t.net
Sun Feb 26 18:58:25 PST 2012
Return BadValue if major or minor differs on the second call.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Xi/xiqueryversion.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Xi/xiqueryversion.c b/Xi/xiqueryversion.c
index a940614..befa383 100644
--- a/Xi/xiqueryversion.c
+++ b/Xi/xiqueryversion.c
@@ -71,6 +71,15 @@ ProcXIQueryVersion(ClientPtr client)
pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
+ if (pXIClient->major_version &&
+ (stuff->major_version != pXIClient->major_version ||
+ stuff->minor_version != pXIClient->minor_version))
+ {
+ client->errorValue = stuff->major_version;
+ return BadValue;
+ }
+
+
if (version_compare(XIVersion.major_version, XIVersion.minor_version,
stuff->major_version, stuff->minor_version) > 0)
{
--
1.7.7.6
More information about the xorg-devel
mailing list