XFixes: add version check for byteswapped clients

The version check for byteswapped clients was missing.
This commit is contained in:
Demi Marie Obenour 2021-07-20 22:58:42 -04:00
parent 7eba412072
commit 31fb35a7af
1 changed files with 5 additions and 1 deletions

View File

@ -215,7 +215,11 @@ static _X_COLD int
SProcXFixesDispatch(ClientPtr client)
{
REQUEST(xXFixesReq);
if (stuff->xfixesReqType >= XFixesNumberRequests)
XFixesClientPtr pXFixesClient = GetXFixesClient(client);
if (pXFixesClient->major_version >= ARRAY_SIZE(version_requests))
return BadRequest;
if (stuff->xfixesReqType > version_requests[pXFixesClient->major_version])
return BadRequest;
return (*SProcXFixesVector[stuff->xfixesReqType]) (client);
}