diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2021-11-11 09:03:17 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2021-11-11 09:03:17 +0000 |
commit | 79250ad1e2b76f2ba5aa8d6dc0134c6c07ceac3a (patch) | |
tree | 6d31264b9d5ca7fc0d7c690ef6a3340917c949e4 /xserver/damageext/damageext.c | |
parent | 0c0a487400d29e7404b66758c41ad54ee01d46ee (diff) |
Update to xserver 21.1.0
Diffstat (limited to 'xserver/damageext/damageext.c')
-rw-r--r-- | xserver/damageext/damageext.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xserver/damageext/damageext.c b/xserver/damageext/damageext.c index ce490cbf2..c8194da07 100644 --- a/xserver/damageext/damageext.c +++ b/xserver/damageext/damageext.c @@ -561,7 +561,11 @@ static int _X_COLD SProcDamageDispatch(ClientPtr client) { REQUEST(xDamageReq); - if (stuff->damageReqType >= XDamageNumberRequests) + DamageClientPtr pDamageClient = GetDamageClient(client); + + if (pDamageClient->major_version >= ARRAY_SIZE(version_requests)) + return BadRequest; + if (stuff->damageReqType > version_requests[pDamageClient->major_version]) return BadRequest; return (*SProcDamageVector[stuff->damageReqType]) (client); } |