diff options
author | Paul Aurich <darkrain42@pidgin.im> | 2009-08-31 20:10:35 +0000 |
---|---|---|
committer | Paul Aurich <darkrain42@pidgin.im> | 2009-08-31 20:10:35 +0000 |
commit | c9a3e5d288586ff8790a49bec178d891c3817bd7 (patch) | |
tree | bdbf25660b84b9c6e581003498b96e0f3932de76 /libpurple | |
parent | 86ce5516235bb6e79e7a937d5bf5acd4ac62a7f8 (diff) | |
parent | 53693847176510ce037c1da781e61e5e8ce18274 (diff) | |
download | pidgin-c9a3e5d288586ff8790a49bec178d891c3817bd7.tar.gz |
merge of 'f5c49596f57fc83dc46ab2d16a55561d871b3716'
and '2da956f23839bb5d51b261299dae23acfef057c8'
Diffstat (limited to 'libpurple')
-rw-r--r-- | libpurple/protocols/jabber/data.c | 7 | ||||
-rw-r--r-- | libpurple/protocols/jabber/message.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libpurple/protocols/jabber/data.c b/libpurple/protocols/jabber/data.c index 80f88b9714..dcc3b15356 100644 --- a/libpurple/protocols/jabber/data.c +++ b/libpurple/protocols/jabber/data.c @@ -75,6 +75,13 @@ jabber_data_create_from_xml(xmlnode *tag) } 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 --git a/libpurple/protocols/jabber/message.c b/libpurple/protocols/jabber/message.c index 6b11259a65..9fac494f40 100644 --- a/libpurple/protocols/jabber/message.c +++ b/libpurple/protocols/jabber/message.c @@ -493,7 +493,7 @@ jabber_message_get_data_cb(JabberStream *js, const char *from, 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) { |