# HG changeset patch # User Paul Aurich # Date 1251749435 0 # Node ID 087ad09cd4f5d9d5c93068e521a524cb321eac41 # Parent 02c62c9ad8222bd17db09f54c18b49a0e4d82196# Parent 191bb5bf2fc514161b0a24f3510abb13ec5411cd merge of '5fabe3309f53afaf46157b615ec20eec581969e5' and 'fd5955618eddcd84d522b30ff11102f9601f38c8' diff -r 02c62c9ad822 -r 087ad09cd4f5 ChangeLog --- a/ChangeLog Mon Aug 31 20:07:36 2009 +0000 +++ b/ChangeLog Mon Aug 31 20:10:35 2009 +0000 @@ -18,6 +18,8 @@ properly. In addition, it is no longer possible to add buddies of the form "room@conference.example.net/User", where room@conference.example.net is a MUC. + * Don't crash when receiving "smileyfied" XHTML-IM from clients that don't + support bits of binary (ie. when getting an empty in return) Yahoo!/Yahoo! JAPAN: * Accounts now have "Use account proxy for SSL connections" option. This diff -r 02c62c9ad822 -r 087ad09cd4f5 libpurple/protocols/jabber/data.c --- a/libpurple/protocols/jabber/data.c Mon Aug 31 20:07:36 2009 +0000 +++ b/libpurple/protocols/jabber/data.c Mon Aug 31 20:10:35 2009 +0000 @@ -75,6 +75,13 @@ } raw_data = xmlnode_get_data(tag); + + if (raw_data == NULL) { + purple_debug_error("jabber", "data element was empty"); + g_free(data); + return NULL; + } + if (raw_data == NULL || *raw_data == '\0') { g_free(raw_data); return NULL; diff -r 02c62c9ad822 -r 087ad09cd4f5 libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Mon Aug 31 20:07:36 2009 +0000 +++ b/libpurple/protocols/jabber/message.c Mon Aug 31 20:10:35 2009 +0000 @@ -493,7 +493,7 @@ xmlnode *item_not_found = xmlnode_get_child(packet, "item-not-found"); /* did we get a data element as result? */ - if (data_element) { + if (data_element && type == JABBER_IQ_RESULT) { JabberData *data = jabber_data_create_from_xml(data_element); if (data) {