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 636405 - Add 'g_return_if_fail()' to 'g_settings_bind_with_mapping()'
Add 'g_return_if_fail()' to 'g_settings_bind_with_mapping()'
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gsettings
2.27.x
Other All
: Normal trivial
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-12-03 20:30 UTC by Tomasz Jankowski
Modified: 2011-08-15 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tomasz Jankowski 2010-12-03 20:30:34 UTC
Hello!

'g_settings_bind_with_mapping()' doesn't check if passed 'object' isn't NULL. In result, when NULL is passed as 'object' argument to 'g_settings_bind()' (or directly to 'g_settings_bind_with_mapping()') we get segmentation fault.

Simple 'g_return_if_fail (object!= NULL)' prevented from segmentation faults at this point.
Comment 1 Christian Persch 2011-01-01 14:17:39 UTC
While it may make sense to add some g_return_if_fail here, the fact that you're passing NULL is a bug in *your* code, and yours to fix.
Comment 2 Allison Karlitskaya (desrt) 2011-08-15 14:44:00 UTC
commit 2b0171a8080c233f85c1d66fa6df6d75640b37e5
Author: Ryan Lortie <desrt@desrt.ca>
Date:   Mon Aug 15 10:42:35 2011 -0400

    g_settings_bind: add some g_return checks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=636405