summaryrefslogtreecommitdiff
path: root/gio/gdbusmessage.c
diff options
context:
space:
mode:
Diffstat (limited to 'gio/gdbusmessage.c')
-rw-r--r--gio/gdbusmessage.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index b9f32e921..3a1a1f9e9 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -1984,7 +1984,7 @@ g_dbus_message_bytes_needed (guchar *blob,
"Unable to determine message blob length - given blob is malformed");
}
- if (ret > (2<<27))
+ if (ret > (1<<27))
{
g_set_error (error,
G_IO_ERROR,
@@ -2731,7 +2731,6 @@ g_dbus_message_to_blob (GDBusMessage *message,
if (message->body != NULL)
{
gchar *tupled_signature_str;
- tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
if (signature == NULL)
{
g_set_error (error,
@@ -2739,10 +2738,10 @@ g_dbus_message_to_blob (GDBusMessage *message,
G_IO_ERROR_INVALID_ARGUMENT,
_("Message body has signature ā€œ%sā€ but there is no signature header"),
signature_str);
- g_free (tupled_signature_str);
goto out;
}
- else if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
+ tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
+ if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
{
g_set_error (error,
G_IO_ERROR,