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 700518 - system_default may be 0 in set_use_system_ca_file from soup-session.c
system_default may be 0 in set_use_system_ca_file from soup-session.c
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
2.43.x
Other Mac OS
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2013-05-17 12:11 UTC by Roland Peffer
Modified: 2013-05-20 17:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Roland Peffer 2013-05-17 12:11:17 UTC
I just found that under special circumstances 
	system_default = g_tls_backend_get_default_database (g_tls_backend_get_default ());
may return NULL.
I added a 
	if(system_default) 
on line 476
----------------------------------
static void
set_use_system_ca_file (SoupSession *session, gboolean use_system_ca_file)
{
	SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session);
	GTlsDatabase *system_default;

	system_default = g_tls_backend_get_default_database (g_tls_backend_get_default ());

	if (use_system_ca_file)
		set_tlsdb (session, system_default);
	else if (priv->tlsdb == system_default)
		set_tlsdb (session, NULL);

	if(system_default) 
		g_object_unref (system_default);
}
Comment 1 Dan Winship 2013-05-20 17:55:53 UTC
Thanks. I fixed that and a few other places where the same problem could
possibly happen.