diff libpurple/protocols/jabber/message.c @ 28156:191bb5bf2fc5

Don't crash when receiving an error iq response when trying fetch a custom smiley (will happen if a client not supporting BoB sends XHTML-IM containing cid: images). Thanks to Florob, Waqas and Darkrain for finding and hinting about this :)
author Marcus Lundblad <ml@update.uu.se>
date Mon, 31 Aug 2009 20:07:34 +0000
parents faf98a4b27d8
children e8717ca47d25 fba8dd643796 508bd30ee8ba
line wrap: on
line diff
--- a/libpurple/protocols/jabber/message.c	Mon Aug 31 16:12:03 2009 +0000
+++ b/libpurple/protocols/jabber/message.c	Mon Aug 31 20:07:34 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) {