summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
authorNei <ailin.nemui@gmail.com>2017-10-20 13:23:28 +0000
committerNei <ailin.nemui@gmail.com>2017-10-20 13:23:28 +0000
commit495bdd11cf37630547647ebc751693ace351dddf (patch)
tree22ca2d28a41d3276fcf9db2e15837ca963ca4df2 /src/irc/core
parentc46bed1e17185d4a20a0f382cf5253bf91829543 (diff)
parent45dfe2ba3889c5dc23a9bea3214f158cc651a043 (diff)
downloadirssi-495bdd11cf37630547647ebc751693ace351dddf.zip
Merge branch 'fix-16' into 'security'
Prevent a OOB read when parsing IRCNet ! channels See merge request irssi/irssi!22
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/channel-events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c
index 6cb9b088..b0bddab2 100644
--- a/src/irc/core/channel-events.c
+++ b/src/irc/core/channel-events.c
@@ -37,7 +37,7 @@ static void check_join_failure(IRC_SERVER_REC *server, const char *channel)
channel++; /* server didn't understand !channels */
chanrec = channel_find(SERVER(server), channel);
- if (chanrec == NULL && channel[0] == '!') {
+ if (chanrec == NULL && channel[0] == '!' && strlen(channel) > 6) {
/* it probably replied with the full !channel name,
find the channel with the short name.. */
chan2 = g_strdup_printf("!%s", channel+6);