comparison libpurple/protocols/irc/msgs.c @ 28176:00302e68c31d

Fix parsing of invalid IRC TOPIC messages which contain no actual topic string. Thanks to Cristofaro Mune for finding this.
author Ethan Blanton <elb@pidgin.im>
date Thu, 03 Sep 2009 16:05:01 +0000
parents f9cf1e14838b
children 0357ae320ba5
comparison
equal deleted inserted replaced
28175:558ce0b09e0e 28176:00302e68c31d
443 { 443 {
444 char *chan, *topic, *msg, *nick, *tmp, *tmp2; 444 char *chan, *topic, *msg, *nick, *tmp, *tmp2;
445 PurpleConversation *convo; 445 PurpleConversation *convo;
446 446
447 if (!strcmp(name, "topic")) { 447 if (!strcmp(name, "topic")) {
448 if (!args[0] || !args[1])
449 return;
448 chan = args[0]; 450 chan = args[0];
449 topic = irc_mirc2txt (args[1]); 451 topic = irc_mirc2txt (args[1]);
450 } else { 452 } else {
453 if (!args[0] || !args[1] || !args[2])
454 return
451 chan = args[1]; 455 chan = args[1];
452 topic = irc_mirc2txt (args[2]); 456 topic = irc_mirc2txt (args[2]);
453 } 457 }
454 458
455 convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, chan, irc->account); 459 convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, chan, irc->account);