GNOME Bugzilla – Bug 51952
invalid use of G_GNUC_CONST for gdk_atom_name()
Last modified: 2011-02-04 16:09:32 UTC
It looks like gdk_atom_name() is specified as being a const return function with G_GNUC_CONST. However according to the X11 implementation, it returns the name as a strdup'd string. This means that gcc may optimise away a call to gdk_atom_name, returning a memory address that someone else owns (and may have already freed), potentially causing a crash. The fix is to remove G_GNUC_CONST from the prototype in the gdkproperties.h header.
Tue May 29 15:46:54 2001 Owen Taylor <otaylor@redhat.com> * gdk/gdkproperty.h: Remove inappropriate G_GNUC_CONST (fixes #51952, James Henstridge)