--- a/libpurple/protocols/irc/msgs.c Sat Jan 18 10:21:44 2014 -0800
+++ b/libpurple/protocols/irc/msgs.c Sat Jan 18 10:22:41 2014 -0800
@@ -20,6 +20,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
+ * Note: If you change any of these functions to use additional args you + * MUST ensure the arg count is correct in parse.c. Otherwise it may be + * possible for a malicious server or man-in-the-middle to trigger a crash. #include "conversation.h"
@@ -250,6 +256,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
purple_notify_error(gc, NULL, _("Bad mode"), args[1]);
@@ -299,6 +307,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
buf = g_strdup_printf(_("You are banned from %s."), args[1]);
purple_notify_error(gc, _("Banned"), _("Banned"), buf);
@@ -645,6 +655,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
buf = g_strdup_printf(_("Unknown message '%s'"), args[1]);
purple_notify_error(gc, _("Unknown message"), buf, _("The IRC server received a message it did not understand."));
@@ -773,6 +785,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
purple_notify_message(gc, PURPLE_NOTIFY_MSG_INFO, _("Time Response"),
_("The IRC server's local time is:"),
@@ -782,6 +796,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
purple_notify_error(gc, NULL, _("No such channel"), args[1]);
@@ -870,6 +886,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
buf = g_strdup_printf(_("Joining %s requires an invitation."), args[1]);
purple_notify_error(gc, _("Invitation only"), _("Invitation only"), buf);
@@ -1179,6 +1197,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
purple_notify_error(gc, _("Cannot change nick"), _("Could not change nick"), args[2]);
@@ -1320,6 +1340,8 @@
PurpleConversation *convo;
convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account);
/* This is a channel we're already in; for some reason,
@@ -1340,6 +1362,8 @@
data[0] = irc_mask_nick(from);
/* XXX this should have an API, I shouldn't grab this directly */
@@ -1366,6 +1390,8 @@
PurpleConnection *gc = purple_account_get_connection(irc->account);
nick = irc_mask_nick(from);
msg = g_strdup_printf (_("Wallops from %s"), nick);