Commit 105cd2be authored by Ulrich Sibiller's avatar Ulrich Sibiller

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
parent bb9ac3fd
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment