1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-13 05:03:45 -04:00

Merge branch 'fix-16' into 'security'

Prevent a OOB read when parsing IRCNet ! channels

See merge request irssi/irssi!22
This commit is contained in:
Nei 2017-10-20 13:23:28 +00:00
commit 495bdd11cf

View File

@ -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);