mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-14 22:40:29 +01:00
randr: fix unconditional byte-swap in ProcRRGetProviderInfo()
The list of the associated provider's capabilities was always swapped unconditionally, while it should only be in case of client having opposite endianess. Fixes:4c92eb00f("randr: add output source setup") Reported-By: dasha_uwu Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1977> (cherry picked from commit73f3c47608)
This commit is contained in:
parent
b0c8e4ef7e
commit
061278dc23
1 changed files with 4 additions and 3 deletions
|
|
@ -221,10 +221,11 @@ ProcRRGetProviderInfo (ClientPtr client)
|
|||
}
|
||||
if (provider->output_source) {
|
||||
providers[i] = provider->output_source->id;
|
||||
if (client->swapped)
|
||||
swapl(&providers[i]);
|
||||
prov_cap[i] = RR_Capability_SourceOutput;
|
||||
if (client->swapped) {
|
||||
swapl(&providers[i]);
|
||||
swapl(&prov_cap[i]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
xorg_list_for_each_entry(provscreen, &pScreen->secondary_list, secondary_head) {
|
||||
|
|
@ -246,7 +247,7 @@ ProcRRGetProviderInfo (ClientPtr client)
|
|||
|
||||
memcpy(name, provider->name, rep.nameLength);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.capabilities);
|
||||
swaps(&rep.nCrtcs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue