[network-manager-applet] applet-agent: fix crash in get_secrets_cb() iterating result variant



commit bf3ad38741124635f6e0ff41d95b7c8524a4088b
Author: Thomas Haller <thaller redhat com>
Date:   Wed Jun 3 14:37:01 2015 +0200

    applet-agent: fix crash in get_secrets_cb() iterating result variant
    
    g_variant_iter_next() needs a format string.
    
    Fixes: 3722a190468f5ce5898db8838611bc826d3153f1

 src/applet-agent.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/applet-agent.c b/src/applet-agent.c
index 0c61c62..93935e2 100644
--- a/src/applet-agent.c
+++ b/src/applet-agent.c
@@ -174,7 +174,7 @@ get_secrets_cb (AppletAgent *self,
                        /* Copy the existing connection and update its secrets */
                        dupl = nm_simple_connection_new_clone (r->connection);
                        g_variant_iter_init (&iter, secrets);
-                       while (g_variant_iter_next (&iter, (gpointer) &setting_name, NULL))
+                       while (g_variant_iter_next (&iter, "{&s a{sv}}", (gpointer) &setting_name, NULL))
                                nm_connection_update_secrets (dupl, setting_name, secrets, NULL);
 
                        /* And save updated secrets to the keyring */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]