summaryrefslogtreecommitdiff
path: root/xserver/Xext/geext.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-11-11 09:03:17 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-11-11 09:03:17 +0000
commit79250ad1e2b76f2ba5aa8d6dc0134c6c07ceac3a (patch)
tree6d31264b9d5ca7fc0d7c690ef6a3340917c949e4 /xserver/Xext/geext.c
parent0c0a487400d29e7404b66758c41ad54ee01d46ee (diff)
Update to xserver 21.1.0
Diffstat (limited to 'xserver/Xext/geext.c')
-rw-r--r--xserver/Xext/geext.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xserver/Xext/geext.c b/xserver/Xext/geext.c
index 5009c081a..05988c41a 100644
--- a/xserver/Xext/geext.c
+++ b/xserver/Xext/geext.c
@@ -138,9 +138,15 @@ ProcGEDispatch(ClientPtr client)
static int _X_COLD
SProcGEDispatch(ClientPtr client)
{
+ GEClientInfoPtr pGEClient = GEGetClient(client);
+
REQUEST(xGEReq);
- if (stuff->ReqType >= GENumberRequests)
+
+ if (pGEClient->major_version >= ARRAY_SIZE(version_requests))
return BadRequest;
+ if (stuff->ReqType > version_requests[pGEClient->major_version])
+ return BadRequest;
+
return (*SProcGEVector[stuff->ReqType]) (client);
}