Xi: prohibit multiple XIQueryVersion requests with different versions
Return BadValue if major or minor differs on the second call. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
eb84c154ed
commit
2c23ef83b0
|
@ -70,6 +70,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) {
|
||||
major = stuff->major_version;
|
||||
|
|
Loading…
Reference in New Issue
Block a user