# HG changeset patch # User Paul Aurich # Date 1241298662 0 # Node ID b9a90f34b78097accfab58270f86b2f845e81e32 # Parent 9931796e176569d35d21cb29e555aa0b6e5b5d2a *** Plucked rev b786784e (datallah@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. diff -r 9931796e1765 -r b9a90f34b780 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sat May 02 21:09:37 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sat May 02 21:11:02 2009 +0000 @@ -376,6 +376,11 @@ 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, '<');