pidgin.2.5.6: a4e91e84: *** Plucked rev b786784e (datallah at pidgi...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sat May 2 17:15:40 EDT 2009


-----------------------------------------------------------------
Revision: a4e91e84a8f8313c81aae1e3a4ec96f03953f28e
Ancestor: 9615ee9f13c70a0247317a319f4856557c3f348b
Author: darkrain42 at pidgin.im
Date: 2009-05-02T21:11:02
Branch: im.pidgin.pidgin.2.5.6
URL: http://d.pidgin.im/viewmtn/revision/info/a4e91e84a8f8313c81aae1e3a4ec96f03953f28e

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

*** Plucked rev b786784e (datallah at pidgin.im):
Prevent a buggy XMPP-raw plugin from causing a NUL ptr deref - instead the
debug output may be slightly mangled.
This came out of the veracode analysis.


-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	92a876dc2f0f8a907dfc2378ebb8cacb5b80a6a0
+++ libpurple/protocols/jabber/jabber.c	f35377fffa8deeeeb78be055e3b634cac8285f66
@@ -376,6 +376,11 @@ void jabber_send_raw(JabberStream *js, c
 			char *data_start, *tag_end = strchr(tag_start, '>');
 			text = g_strdup(data);
 
+			/* Better to print out some wacky debugging than crash
+			 * due to a plugin sending bad xml */
+			if (tag_end == NULL)
+				tag_end = tag_start;
+
 			data_start = text + (tag_end - data) + 1;
 
 			last_part = strchr(data_start, '<');


More information about the Commits mailing list