mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 07:18:05 +02:00
Xext/xres: add missing byte-swap of spec entries in SProcXResQueryClientIds
SProcXResQueryClientIds() swapped the numSpecs field but did not swap the individual xXResClientIdSpec entries that follow the request header. Each spec contains two CARD32 fields: client (an XID) and mask (a bitmask selecting which client ID types to query). 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
87df8bcc19
commit
f7b5749315
1 changed files with 12 additions and 0 deletions
12
Xext/xres.c
12
Xext/xres.c
|
|
@ -1047,10 +1047,22 @@ SProcXResQueryClientPixmapBytes(ClientPtr client)
|
|||
static int _X_COLD
|
||||
SProcXResQueryClientIds (ClientPtr client)
|
||||
{
|
||||
int i;
|
||||
xXResClientIdSpec *specs;
|
||||
|
||||
REQUEST(xXResQueryClientIdsReq);
|
||||
|
||||
REQUEST_AT_LEAST_SIZE (xXResQueryClientIdsReq);
|
||||
swapl(&stuff->numSpecs);
|
||||
REQUEST_FIXED_SIZE(xXResQueryClientIdsReq,
|
||||
stuff->numSpecs * sizeof(xXResClientIdSpec));
|
||||
|
||||
specs = (xXResClientIdSpec *) (stuff + 1);
|
||||
for (i = 0; i < stuff->numSpecs; i++) {
|
||||
swapl(&specs[i].client);
|
||||
swapl(&specs[i].mask);
|
||||
}
|
||||
|
||||
return ProcXResQueryClientIds(client);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue