From 105cd2be6dfce3579cb585a8d78f655f19cef57b Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 8 Jan 2020 00:10:20 +0100 Subject: Rootless.c: fix wring datatype being used Using XlibAtom here is wrong. On a 64bit system the size of this type is 8 bytes (64bit). At this stage we do not read Xlib datatypes but wire datatypes. Over the wire an Atom is always 32bit, so we need to use CARD32 here. Fixes ArcticaProject/nx-libs#894 --- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index 85643a853..2adb254f6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -1001,7 +1001,7 @@ void nxagentImportProperty(Window window, else if (strcmp(typeS, "ATOM") == 0) { Atom *atoms = malloc(nitems * sizeof(Atom)); - XlibAtom *input = (XlibAtom*) buffer; + CARD32 *input = (CARD32*) buffer; if (atoms == NULL) { @@ -1017,7 +1017,7 @@ void nxagentImportProperty(Window window, for (int i = 0; i < nitems; i++) { - atoms[i] = nxagentRemoteToLocalAtom(input[i]); + atoms[i] = nxagentRemoteToLocalAtom((XlibAtom)input[i]); if (atoms[i] == None) { -- cgit v1.2.3