Package: telepathy-gabble Version: 0.5.1-1 Tags: patch, fixed-upstream Hi,
Please apply this patch, this fix a crash in some circumstances on connection. The patch is taken from upstream cvs. Have a look at: https://bugs.launchpad.net/ubuntu/+source/telepathy-gabble/+bug/75800 https://bugs.launchpad.net/ubuntu/+source/telepathy-gabble/+bug/103978 Regards Laurent Bigonville
Fri Apr 6 16:52:37 CEST 2007 Guillaume Desmottes <[EMAIL PROTECTED]> * fix LmMessage not unrefed leak Mon Apr 9 18:23:15 CEST 2007 Guillaume Desmottes <[EMAIL PROTECTED]> * don't crash if BINVAL markup is empty in vcard (fix LP #103978 and #75800) diff -rN -u old-telepathy-gabble/src/conn-avatars.c new-telepathy-gabble/src/conn-avatars.c --- old-telepathy-gabble/src/conn-avatars.c 2007-04-09 19:20:30.000000000 +0200 +++ new-telepathy-gabble/src/conn-avatars.c 2007-04-09 19:20:30.000000000 +0200 @@ -281,7 +281,7 @@ GabbleConnection *conn; TpBaseConnection *base; LmMessageNode *photo_node, *type_node, *binval_node; - const gchar *mime_type; + const gchar *mime_type, *binval_value; GArray *arr; GError *error = NULL; GString *avatar = NULL; @@ -329,7 +329,18 @@ goto out; } - avatar = base64_decode (lm_message_node_get_value (binval_node)); + binval_value = lm_message_node_get_value (binval_node); + + if (NULL == binval_value) + { + g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + "contact avatar is missing binval content"); + dbus_g_method_return_error (context, error); + g_error_free (error); + goto out; + } + + avatar = base64_decode (binval_value); if (NULL == avatar) { diff -rN -u old-telepathy-gabble/src/gabble-muc-channel.c new-telepathy-gabble/src/gabble-muc-channel.c --- old-telepathy-gabble/src/gabble-muc-channel.c 2007-04-09 19:20:30.000000000 +0200 +++ new-telepathy-gabble/src/gabble-muc-channel.c 2007-04-09 19:20:30.000000000 +0200 @@ -1646,10 +1646,13 @@ error->message); g_error_free (error); + lm_message_unref (msg); close_channel (chan, NULL, TRUE, actor, reason_code); goto OUT; } + + lm_message_unref (msg); } /* Update room properties */ diff -rN -u old-telepathy-gabble/src/vcard-manager.c new-telepathy-gabble/src/vcard-manager.c --- old-telepathy-gabble/src/vcard-manager.c 2007-04-09 19:20:30.000000000 +0200 +++ new-telepathy-gabble/src/vcard-manager.c 2007-04-09 19:20:30.000000000 +0200 @@ -556,28 +556,37 @@ if (node) { DEBUG ("Our vCard has a PHOTO %p", node); - GString *avatar = NULL; LmMessageNode *binval = lm_message_node_get_child (node, "BINVAL"); if (binval) { - gchar *sha1; + const gchar *binval_value; - avatar = base64_decode (lm_message_node_get_value (binval)); - if (avatar) - { - sha1 = sha1_hex (avatar->str, avatar->len); - DEBUG ("Successfully decoded PHOTO.BINVAL, SHA-1 %s", sha1); - g_signal_emit (self, signals[GOT_SELF_INITIAL_AVATAR], 0, sha1); - g_free (sha1); - } - else + binval_value = lm_message_node_get_value (binval); + + if (binval_value) { - DEBUG ("Avatar is in garbled Base64, ignoring it:\n%s", - lm_message_node_get_value (binval)); - } + gchar *sha1; + GString *avatar; + + avatar = base64_decode (binval_value); - g_string_free (avatar, TRUE); + if (avatar) + { + sha1 = sha1_hex (avatar->str, avatar->len); + DEBUG ("Successfully decoded PHOTO.BINVAL, SHA-1 %s", sha1); + g_signal_emit (self, signals[GOT_SELF_INITIAL_AVATAR], 0, + sha1); + g_free (sha1); + } + else + { + DEBUG ("Avatar is in garbled Base64, ignoring it:\n%s", + lm_message_node_get_value (binval)); + } + + g_string_free (avatar, TRUE); + } } }
pgphrpyeV8g7f.pgp
Description: PGP signature