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 727965 - Make goa_provider_get_for_provider_type robust against NULL
Make goa_provider_get_for_provider_type robust against NULL
Status: RESOLVED DUPLICATE of bug 696267
Product: gnome-online-accounts
Classification: Core
Component: general
3.8.x
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-04-10 13:37 UTC by Debarshi Ray
Modified: 2014-04-10 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Debarshi Ray 2014-04-10 13:37:23 UTC
Passing a NULL provider_type to goa_provider_get_for_provider_type will lead to a crash because g_io_extension_point_get_extension_by_name is not NULL-safe (bug 727964). A corrupt accounts.conf is one of the cases where this can happen. See: https://bugzilla.redhat.com/show_bug.cgi?id=991794

Regardless of whether g_io_extension_point_get_extension_by_name becomes NULL safe or not, I think we should handle it ourselves. Otherwise it is liable to break if the implementation of the function changes.
Comment 1 Debarshi Ray 2014-04-10 13:53:41 UTC
Turns out this was fixed during the 3.9.x cycle:

commit c27873a0109f68f056acd8740acf8f687aca55a0
Author: Marco Barisione <marco.barisione@collabora.co.uk>
Date:   Tue Aug 20 15:47:31 2013 +0100

    provider: check that provider_type is not NULL in get_for_provider_type()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696267

*** This bug has been marked as a duplicate of bug 696267 ***