mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 09:38:14 +02:00
Xext/xres: fix wrong swap check
The byte-swap check for rep.spec.client used 'client->swapped' (the queried client) instead of 'sendClient->swapped' (the requesting client). The reply is sent to sendClient, so swapping must be based on sendClient's byte order. When a byte-swapped client queries a native-byte-order client (or vice versa), the spec.client field in the reply has the wrong byte order, causing the client library to misinterpret the XID. Lines 504 and later correctly use sendClient->swapped, so this was an oversight. Co-Authored-by: Claude Code <noreply@anthropic.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2181>
This commit is contained in:
parent
f7b5749315
commit
d2d4fb35e7
1 changed files with 1 additions and 1 deletions
|
|
@ -462,7 +462,7 @@ ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
|||
xXResClientIdValue rep;
|
||||
|
||||
rep.spec.client = client->clientAsMask;
|
||||
if (client->swapped) {
|
||||
if (sendClient->swapped) {
|
||||
swapl (&rep.spec.client);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue