GNOME Bugzilla – Bug 710449
Invalid memory access in "gdk_x11_window_set_opacity" on 64bit platforms
Last modified: 2017-01-29 23:14:37 UTC
In file: gdk/x11/gdkwindow-x11.c In function: gdk_x11_window_set_opacity (GdkWindow *window, gdouble opacity) guint32 cardinal; ... XChangeProperty (..., 32, PropModeReplace, (guchar *) &cardinal, 1); "man XChangeProperty" says: "If the specified format is 32, the property data must be a long array." That's because XChangeProperty casts this pointer to cardinal to (long*) and copies memory. So, on 64bit platforms guint32 is 32bit, but XChangeProperty casts pointer &cardinal to (long*) and copies 8 bytes and causes invalid memory access. This is known feature of XChangeProperty (for example, the same problem is here: https://bugs.freedesktop.org/show_bug.cgi?id=16802). The possible fix is quite simple: just change "guint32" to "gulong"