diff options
author | Demi Marie Obenour <demi@invisiblethingslab.com> | 2021-08-06 13:23:08 -0400 |
---|---|---|
committer | Povilas Kanapickas <povilas@radix.lt> | 2021-08-08 12:43:01 +0000 |
commit | 659260a0b7c1cef6060bd62a83deb03e3fa472b1 (patch) | |
tree | b05f74c48be2ea64ce09a952031d3b3ed301bf1b /damageext | |
parent | e4dabe8d9395d60699aa9831626920adaa847680 (diff) |
More missing version checks in SProcs
The bug in XFixes was also found in GenericEvent and Damage.
Diffstat (limited to 'damageext')
-rw-r--r-- | damageext/damageext.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/damageext/damageext.c b/damageext/damageext.c index ce490cbf2..c8194da07 100644 --- a/damageext/damageext.c +++ b/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); } |