After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639625 - Crashes on dereferencing a NULL GtkBorder.
Crashes on dereferencing a NULL GtkBorder.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-01-15 22:32 UTC by Krzesimir Nowak
Modified: 2011-01-20 02:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Krzesimir Nowak 2011-01-15 22:32:24 UTC
I'm using Ubuntu 10.04 with jhbuild - Maybe this information will be useful for this bug, because I couldn't reproduce it on Fedora 14 with jhbuild.

In several places (gtkthemingengine.c, gtkbutton.c, gtkcombobox.c, gtkmenubar.c) a "border-width" style property (which is a GtkBorder*) is retrieved and used in some computations. The problem lies in a case when returned border is NULL and this is not checked and thus a segfault happens.

I'm attaching quick and dirty patch fixing it by creating a new GtkBorder if returned one was NULL, although I don't know if it shouldn't be fixed somewhere else or whether the created border should have other initial values.
Comment 1 Matthias Clasen 2011-01-16 18:15:56 UTC
This should be fixed by supporting default values for style properties
Comment 2 Matthias Clasen 2011-01-20 02:25:09 UTC
Fixed for now by guaranteeing non-NULL defaults for all style properties of type GtkBorder