glx: Check for byte-swapping in SetReplyHeader

Check for the need to byte-swap when attempting to display
GL apps between a big-endian server and little-endian client
or vice versa.

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1127
This commit is contained in:
Niveditha Rau 2021-05-11 15:08:41 -07:00
parent bcb1de600a
commit 2de5ded3c6

View File

@ -92,6 +92,9 @@ static void SetReplyHeader(ClientPtr client, void *replyPtr)
xGenericReply *rep = (xGenericReply *) replyPtr; xGenericReply *rep = (xGenericReply *) replyPtr;
rep->type = X_Reply; rep->type = X_Reply;
rep->sequenceNumber = client->sequence; rep->sequenceNumber = client->sequence;
if (client->swapped) {
swaps(&rep->sequenceNumber);
}
rep->length = 0; rep->length = 0;
} }