mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
commit
495bdd11cf
@ -37,7 +37,7 @@ static void check_join_failure(IRC_SERVER_REC *server, const char *channel)
|
|||||||
channel++; /* server didn't understand !channels */
|
channel++; /* server didn't understand !channels */
|
||||||
|
|
||||||
chanrec = channel_find(SERVER(server), channel);
|
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,
|
/* it probably replied with the full !channel name,
|
||||||
find the channel with the short name.. */
|
find the channel with the short name.. */
|
||||||
chan2 = g_strdup_printf("!%s", channel+6);
|
chan2 = g_strdup_printf("!%s", channel+6);
|
||||||
|
Loading…
Reference in New Issue
Block a user