mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Prevent a OOB read when parsing IRCNet ! channels
Make sure the string has enough data. Fixes #16
This commit is contained in:
parent
28d0b8c746
commit
45dfe2ba38
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user