diff options
author | Colin Walters <walters@verbum.org> | 2010-04-17 11:53:10 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-04-17 13:40:22 -0400 |
commit | cc6dad7ea06eb625b576e6417f2e3a9697c1f1a0 (patch) | |
tree | 6c62f3b023036722532ab967101a064d4a0708f0 | |
parent | 88e4af42e1a8ec9c77e4e9b1905cf4c46039ebbb (diff) |
Validate internal use of properties signatures
If we get an invalid message, just ignore it - don't abort.
Signed-off-by: David Zeuthen <davidz@redhat.com>
-rw-r--r-- | gdbus/gdbusproxy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdbus/gdbusproxy.c b/gdbus/gdbusproxy.c index 9c7d8d6..01f3867 100644 --- a/gdbus/gdbusproxy.c +++ b/gdbus/gdbusproxy.c @@ -543,6 +543,8 @@ on_properties_changed (GDBusConnection *connection, goto out; #endif + if (strcmp (g_variant_get_type_string (result), "(sa{sv})") != 0) + return; g_variant_get (parameters, "(sa{sv})", &interface_name_for_signal, @@ -639,6 +641,9 @@ process_get_all_reply (GDBusProxy *proxy, { GVariantIter iter; GVariant *item; + + if (strcmp (g_variant_get_type_string (result), "(a{sv})") != 0) + return; proxy->priv->properties = g_hash_table_new_full (g_str_hash, g_str_equal, |