diff -u telepathy-gabble-0.5.5/debian/changelog telepathy-gabble-0.5.5/debian/changelog --- telepathy-gabble-0.5.5/debian/changelog +++ telepathy-gabble-0.5.5/debian/changelog @@ -1,3 +1,12 @@ +telepathy-gabble (0.5.5-1ubuntu1) feisty; urgency=low + + * debian/patches/01fix_null_binval.patch: + - Fix avatar related crash and a memory leak (LP: #103978, #75800) + Thanks to Guillaume Desmottes + * Follow DebianMaintainerField policy + + -- Laurent Bigonville Mon, 9 Apr 2007 19:59:06 +0200 + telepathy-gabble (0.5.5-1) unstable; urgency=low * New upstream release diff -u telepathy-gabble-0.5.5/debian/control telepathy-gabble-0.5.5/debian/control --- telepathy-gabble-0.5.5/debian/control +++ telepathy-gabble-0.5.5/debian/control @@ -1,7 +1,8 @@ Source: telepathy-gabble Section: net Priority: optional -Maintainer: Dafydd Harries +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Dafydd Harries Uploaders: Daniel Holbach , Riccardo Setti , Simon McVittie , Sjoerd Simons Build-Depends: cdbs, debhelper (>= 5), libglib2.0-dev (>= 2.4), libdbus-glib-1-dev (>= 0.72), libloudmouth1-dev (>= 1.1.1), python, xsltproc Standards-Version: 3.7.2 only in patch2: unchanged: --- telepathy-gabble-0.5.5.orig/debian/patches/01fix_null_binval.patch +++ telepathy-gabble-0.5.5/debian/patches/01fix_null_binval.patch @@ -0,0 +1,110 @@ +Fri Apr 6 16:52:37 CEST 2007 Guillaume Desmottes + * fix LmMessage not unrefed leak +Mon Apr 9 18:23:15 CEST 2007 Guillaume Desmottes + * 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); ++ } + } + } + +