components/gnome/gvfs/patches/02-monitor-crash.patch
changeset 6739 8e4786e21910
equal deleted inserted replaced
6736:6ad7817ce1b1 6739:8e4786e21910
       
     1 Patch from upstream git for Solaris bug 24560147
       
     2 https://git.gnome.org/browse/gvfs/commit/?id=77805a9871fcf53e99ccece6509faea77fcf93b4
       
     3 
       
     4 From 77805a9871fcf53e99ccece6509faea77fcf93b4 Mon Sep 17 00:00:00 2001
       
     5 From: Tristan Van Berkom <[email protected]>
       
     6 Date: Tue, 6 Oct 2015 15:09:04 +0900
       
     7 Subject: [PATCH] Avoid crash when no monitor implementations exist.
       
     8 
       
     9 The GVariantBuilder is unable to create any GVariant for
       
    10 an untyped array - while an empty vector is a valid variant,
       
    11 it is not valid for an untyped array.
       
    12 
       
    13 Passing the resulting null to gvfs_dbus_daemon_complete_cancel()
       
    14 causes gvfs to abort with a g_error().
       
    15 
       
    16 https://bugzilla.gnome.org/show_bug.cgi?id=756105
       
    17 ---
       
    18  daemon/gvfsdaemon.c | 2 +-
       
    19  1 file changed, 1 insertion(+), 1 deletion(-)
       
    20 
       
    21 diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
       
    22 index 7bc334b..b7a3b88 100644
       
    23 --- a/daemon/gvfsdaemon.c
       
    24 +++ b/daemon/gvfsdaemon.c
       
    25 @@ -957,7 +957,7 @@ handle_list_monitor_implementations (GVfsDBusDaemon        *object,
       
    26  
       
    27    impls = g_vfs_list_monitor_implementations ();
       
    28  
       
    29 -  g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
       
    30 +  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ssbia{sv})"));
       
    31  
       
    32    for (l = impls; l != NULL; l = l->next)
       
    33      {
       
    34 -- 
       
    35 2.7.4
       
    36