1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

don't crash if server sends us !channel name less than 6 chars.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2817 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-05-19 08:18:09 +00:00 committed by cras
parent dc0088f584
commit e2ffdfec50

View File

@ -227,7 +227,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, const char *nic
tmp = strchr(channel, 7); /* ^G does something weird.. */
if (tmp != NULL) *tmp = '\0';
if (*channel != '!')
if (*channel != '!' || strlen(channel) < 7)
shortchan = NULL;
else {
/* !channels have 5 chars long identification string before