# HG changeset patch # User Ethan Blanton # Date 1251993901 0 # Node ID 00302e68c31d15e58d943f62e7d803e9a276bb1f # Parent 558ce0b09e0e1a910431d5e75307b7e88f1e1e3a Fix parsing of invalid IRC TOPIC messages which contain no actual topic string. Thanks to Cristofaro Mune for finding this. diff -r 558ce0b09e0e -r 00302e68c31d ChangeLog --- a/ChangeLog Thu Sep 03 16:03:39 2009 +0000 +++ b/ChangeLog Thu Sep 03 16:05:01 2009 +0000 @@ -6,6 +6,9 @@ to just making the warning non-fatal. * Fix using GNOME proxy settings properly. (Erik van Pienbroek) + IRC: + * Fix parsing of invalid TOPIC messages. + MSN: * Sending custom smileys in chats is now supported. * Ink messages are now saved when using the HTML logger. diff -r 558ce0b09e0e -r 00302e68c31d libpurple/protocols/irc/msgs.c --- a/libpurple/protocols/irc/msgs.c Thu Sep 03 16:03:39 2009 +0000 +++ b/libpurple/protocols/irc/msgs.c Thu Sep 03 16:05:01 2009 +0000 @@ -445,9 +445,13 @@ PurpleConversation *convo; if (!strcmp(name, "topic")) { + if (!args[0] || !args[1]) + return; chan = args[0]; topic = irc_mirc2txt (args[1]); } else { + if (!args[0] || !args[1] || !args[2]) + return chan = args[1]; topic = irc_mirc2txt (args[2]); }