A 32bit value must be dereferenced to correctly zero-extend an Atom
from XIGetProperty. On 64bit systems, Atom is 64bits, so the final
Atom in a list will read garbage in the upper half of the Atom.
X.Org Bug 27657 <http://bugs.freedesktop.org/show_bug.cgi?id=27657>
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
- Atom a = *(Atom*)ptr;
- printf("\"%s\" (%d)",
+ Atom a = *(uint32_t*)ptr;
+ printf("\"%s\" (%ld)",
(a) ? XGetAtomName(dpy, a) : "None",
(a) ? XGetAtomName(dpy, a) : "None",