pidgin: ad2c6ee5: Fix parsing of invalid IRC TOPIC message...

elb at pidgin.im elb at pidgin.im
Thu Sep 3 12:11:36 EDT 2009


-----------------------------------------------------------------
Revision: ad2c6ee53ec9122b25aeb1f918db53be69bdeac3
Ancestor: e831c6c52971a4a144a47c3affa19788d05d58d4
Author: elb at pidgin.im
Date: 2009-09-03T16:05:01
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ad2c6ee53ec9122b25aeb1f918db53be69bdeac3

Modified files:
        ChangeLog libpurple/protocols/irc/msgs.c

ChangeLog: 

Fix parsing of invalid IRC TOPIC messages which contain no actual topic
string.  Thanks to Cristofaro Mune for finding this.

-------------- next part --------------
============================================================
--- ChangeLog	831e2ebdd0260b68a2c19f6ee47eeec600d43d9c
+++ ChangeLog	b79f978b87dd623bd1fee6f93b4279055e57ff12
@@ -6,6 +6,9 @@ version 2.6.2 (??/??/2009):
 	  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.
============================================================
--- libpurple/protocols/irc/msgs.c	6d17f00388dffe02b6d0699998e5921293fb25cc
+++ libpurple/protocols/irc/msgs.c	7bd2efb6b570875cb82b9745fc3a12dd89a5ddbd
@@ -445,9 +445,13 @@ void irc_msg_topic(struct irc_conn *irc,
 	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]);
 	}


More information about the Commits mailing list