aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-08 00:10:20 +0100
committerUlrich Sibiller <uli42@gmx.de>2020-01-08 00:10:20 +0100
commit105cd2be6dfce3579cb585a8d78f655f19cef57b (patch)
tree252f2d99a85bce7ba7468c7d2ded5238a8158fbf
parentbb9ac3fd3f7069ca61d98e3a94d1df7d5781813e (diff)
downloadnx-libs-105cd2be6dfce3579cb585a8d78f655f19cef57b.tar.gz
nx-libs-105cd2be6dfce3579cb585a8d78f655f19cef57b.tar.bz2
nx-libs-105cd2be6dfce3579cb585a8d78f655f19cef57b.zip
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
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.c4
1 files 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)
{