Fix parsing of invalid IRC TOPIC messages which contain no actual topic
authorEthan Blanton <elb@pidgin.im>
Thu, 03 Sep 2009 16:05:01 +0000
changeset615584769b59 pushlog
parent db0a324d17e6
child c96b00ae630f
Fix parsing of invalid IRC TOPIC messages which contain no actual topic
string. Thanks to Cristofaro Mune for finding this.
ChangeLog
libpurple/protocols/irc/msgs.c
     1.1 --- a/ChangeLog
     1.2 +++ b/ChangeLog
     1.3 @@ -6,6 +6,9 @@
     1.4  	  to just making the warning non-fatal.
     1.5  	* Fix using GNOME proxy settings properly.  (Erik van Pienbroek)
     1.6  
     1.7 +	IRC:
     1.8 +	* Fix parsing of invalid TOPIC messages.
     1.9 +
    1.10  	MSN:
    1.11  	* Sending custom smileys in chats is now supported.
    1.12  	* Ink messages are now saved when using the HTML logger.
     2.1 --- a/libpurple/protocols/irc/msgs.c
     2.2 +++ b/libpurple/protocols/irc/msgs.c
     2.3 @@ -445,9 +445,13 @@
     2.4  	PurpleConversation *convo;
     2.5  
     2.6  	if (!strcmp(name, "topic")) {
     2.7 +		if (!args[0] || !args[1])
     2.8 +			return;
     2.9  		chan = args[0];
    2.10  		topic = irc_mirc2txt (args[1]);
    2.11  	} else {
    2.12 +		if (!args[0] || !args[1] || !args[2])
    2.13 +			return
    2.14  		chan = args[1];
    2.15  		topic = irc_mirc2txt (args[2]);
    2.16  	}