summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2014-07-22 21:29:27 +0200
committerStef Walter <stefw@gnome.org>2014-07-23 15:44:40 +0200
commit627b49b39039d43a784fa9890f473d1ca8d52417 (patch)
tree07146fc175e3d04852a6ff285b25bb403251b82e
parentb6c1d696a98b7fc4e691e8acc9f88b7bc8d57e9d (diff)
gio: Fix regression encoding an array of doubles
Take the simple slow path in this case. Encoding a double takes special precautions as you can see in append_value_to_blob() and friends. https://bugzilla.gnome.org/show_bug.cgi?id=732754
-rw-r--r--gio/gdbusmessage.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index cd995b89b..dcf1758ab 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -1210,6 +1210,11 @@ get_type_fixed_size (const GVariantType *type)
{
/* NB: we do not treat 'b' as fixed-size here because GVariant and
* D-Bus disagree about the size.
+ *
+ * In addition 'd' is encoded differently by GVariant and DBus, so
+ * we force (en|de)coding rather than direct use of fixed data.
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=732754
*/
switch (*g_variant_type_peek_string (type))
{
@@ -1219,7 +1224,7 @@ get_type_fixed_size (const GVariantType *type)
return 2;
case 'i': case 'u': case 'h':
return 4;
- case 'x': case 't': case 'd':
+ case 'x': case 't':
return 8;
default:
return 0;