mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 08:02:13 +02: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:
parent
dc0088f584
commit
e2ffdfec50
1 changed files with 1 additions and 1 deletions
|
|
@ -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.. */
|
tmp = strchr(channel, 7); /* ^G does something weird.. */
|
||||||
if (tmp != NULL) *tmp = '\0';
|
if (tmp != NULL) *tmp = '\0';
|
||||||
|
|
||||||
if (*channel != '!')
|
if (*channel != '!' || strlen(channel) < 7)
|
||||||
shortchan = NULL;
|
shortchan = NULL;
|
||||||
else {
|
else {
|
||||||
/* !channels have 5 chars long identification string before
|
/* !channels have 5 chars long identification string before
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue