From 8843d4f77d8e829135e2ff9b354990134c58c46a Mon Sep 17 00:00:00 2001 From: Will Storey Date: Sat, 21 Oct 2017 20:00:25 -0700 Subject: Strip : from parameters This is to fix #601. The function used to extract the mode string assumed that ":" would only occur in a particular spot. This lead to the possibility that ":" could be treated as part of things like nicknames or mode arguments, where it should have been stripped as part of protocol escaping. --- src/irc/core/modes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/irc/core/modes.c') diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c index cc3d0faf..ecbf2571 100644 --- a/src/irc/core/modes.c +++ b/src/irc/core/modes.c @@ -480,8 +480,8 @@ static void event_user_mode(IRC_SERVER_REC *server, const char *data) static void event_mode(IRC_SERVER_REC *server, const char *data, const char *nick) { - IRC_CHANNEL_REC *chanrec; - char *params, *channel, *mode; + IRC_CHANNEL_REC *chanrec = NULL; + char *params = NULL, *channel = NULL, *mode = NULL; g_return_if_fail(data != NULL); -- cgit v1.2.3