From ef77c486d5fceaaa00b19662a9edaff3e5d92010 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 28 Aug 2024 13:31:35 +0200 Subject: [PATCH] glx: DoQueryContext(): explicitly use reply buf type defined by spec The spec defines the reply as array of "CARD32", not "int". The latter just accidentially has the same type (for now :o), but it's *semantically* incorrect. Using CARD32 instead. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- glx/glxcmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index a17af308e..a7043e93c 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -1659,7 +1659,7 @@ DoQueryContext(__GLXclientState * cl, GLXContextID gcId) { ClientPtr client = cl->client; __GLXcontext *ctx; - int sendBuf[GLX_QUERY_NPROPS * 2]; + CARD32 sendBuf[GLX_QUERY_NPROPS * 2]; int nReplyBytes; int err; @@ -1694,7 +1694,7 @@ DoQueryContext(__GLXclientState * cl, GLXContextID gcId) __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.n); WriteToClient(client, sizeof(xGLXQueryContextInfoEXTReply), &reply); - __GLX_SWAP_INT_ARRAY((int *) sendBuf, length); + __GLX_SWAP_INT_ARRAY(sendBuf, length); WriteToClient(client, length << 2, sendBuf); } else {