summaryrefslogtreecommitdiff
path: root/daemon/gvfsdaemon.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2015-10-06 15:09:04 +0900
committerOndrej Holy <oholy@redhat.com>2015-10-06 11:25:29 +0200
commit77805a9871fcf53e99ccece6509faea77fcf93b4 (patch)
treeffeaedf197644bf78b8249666997ebe4cefa95cc /daemon/gvfsdaemon.c
parenteef594d24918d28ad5f0f736825a333df955c6c4 (diff)
downloadgvfs-77805a9871fcf53e99ccece6509faea77fcf93b4.tar.gz
Avoid crash when no monitor implementations exist.
The GVariantBuilder is unable to create any GVariant for an untyped array - while an empty vector is a valid variant, it is not valid for an untyped array. Passing the resulting null to gvfs_dbus_daemon_complete_cancel() causes gvfs to abort with a g_error(). https://bugzilla.gnome.org/show_bug.cgi?id=756105
Diffstat (limited to 'daemon/gvfsdaemon.c')
-rw-r--r--daemon/gvfsdaemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
index 7bc334b9..b7a3b885 100644
--- a/daemon/gvfsdaemon.c
+++ b/daemon/gvfsdaemon.c
@@ -957,7 +957,7 @@ handle_list_monitor_implementations (GVfsDBusDaemon *object,
impls = g_vfs_list_monitor_implementations ();
- g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ssbia{sv})"));
for (l = impls; l != NULL; l = l->next)
{