mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 15:28:08 +02:00
render: add missing byte-swap of filter params in SProcRenderSetPictureFilter
SProcRenderSetPictureFilter() swapped the picture and nbytes fields but did not swap the xFixed (CARD32) filter parameter values that follow the filter name string in the request body. 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
e24bd73e9d
commit
c98273d0bc
1 changed files with 13 additions and 0 deletions
|
|
@ -2401,11 +2401,24 @@ SProcRenderQueryFilters(ClientPtr client)
|
|||
static int _X_COLD
|
||||
SProcRenderSetPictureFilter(ClientPtr client)
|
||||
{
|
||||
int nparams;
|
||||
char *name;
|
||||
xFixed *params;
|
||||
|
||||
REQUEST(xRenderSetPictureFilterReq);
|
||||
REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
|
||||
|
||||
swapl(&stuff->picture);
|
||||
swaps(&stuff->nbytes);
|
||||
|
||||
name = (char *) (stuff + 1);
|
||||
params = (xFixed *) (name + pad_to_int32(stuff->nbytes));
|
||||
nparams = ((xFixed *) stuff + client->req_len) - params;
|
||||
if (nparams < 0)
|
||||
return BadLength;
|
||||
|
||||
SwapLongs((CARD32*)params, nparams);
|
||||
|
||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue