From 2de5ded3c6d73c1672d2cb14d603cb23fcd477e5 Mon Sep 17 00:00:00 2001 From: Niveditha Rau Date: Tue, 11 May 2021 15:08:41 -0700 Subject: 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 --- glx/vndcmds.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'glx') diff --git a/glx/vndcmds.c b/glx/vndcmds.c index 21c6fef9e..d6d8719e1 100644 --- a/glx/vndcmds.c +++ b/glx/vndcmds.c @@ -92,6 +92,9 @@ static void SetReplyHeader(ClientPtr client, void *replyPtr) xGenericReply *rep = (xGenericReply *) replyPtr; rep->type = X_Reply; rep->sequenceNumber = client->sequence; + if (client->swapped) { + swaps(&rep->sequenceNumber); + } rep->length = 0; } -- cgit v1.2.3