summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Blanton <elb@pidgin.im>2009-09-03 16:05:01 +0000
committerEthan Blanton <elb@pidgin.im>2009-09-03 16:05:01 +0000
commit914d5708657f0e900454d97e5073d9fe634a57af (patch)
treeb0f8578d0afb7a19bfe9f1047d7f13df09e1210c
parent294dc550f7159d4f4e237ad2642aa509da06d0a2 (diff)
downloadpidgin-914d5708657f0e900454d97e5073d9fe634a57af.tar.gz
Fix parsing of invalid IRC TOPIC messages which contain no actual topic
string. Thanks to Cristofaro Mune for finding this.
-rw-r--r--ChangeLog3
-rw-r--r--libpurple/protocols/irc/msgs.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 91bc87195a..18b85a2955 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/libpurple/protocols/irc/msgs.c b/libpurple/protocols/irc/msgs.c
index 2bfd0dc651..ce33402259 100644
--- a/libpurple/protocols/irc/msgs.c
+++ b/libpurple/protocols/irc/msgs.c
@@ -445,9 +445,13 @@ void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, cha
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]);
}