mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:23:14 +02:00
irc: fix crash when receiving a malformed message 324 (channel mode)
Thanks to Stuart Nevans Locke for reporting the issue.
This commit is contained in:
@@ -30,6 +30,7 @@ Bug fixes::
|
||||
|
||||
* core: flush stdout/stderr before forking in hook_process function (issue #1441)
|
||||
* core: fix evaluation of condition with nested "if" (issue #1434)
|
||||
* irc: fix crash when receiving a malformed message 324 (channel mode)
|
||||
* irc: add nick changes in the hotlist (except self nick change)
|
||||
* irc: case-insensitive comparison on incoming CTCP command, force upper case on CTCP replies (issue #1439)
|
||||
* irc: fix memory leak when the channel topic is changed
|
||||
|
||||
@@ -224,17 +224,20 @@ irc_mode_channel_update (struct t_irc_server *server,
|
||||
current_arg++;
|
||||
if (pos[0] == chanmode)
|
||||
{
|
||||
chanmode_found = 1;
|
||||
if (set_flag == '+')
|
||||
if (!chanmode_found)
|
||||
{
|
||||
str_mode[0] = pos[0];
|
||||
str_mode[1] = '\0';
|
||||
strcat (new_modes, str_mode);
|
||||
if (argument)
|
||||
chanmode_found = 1;
|
||||
if (set_flag == '+')
|
||||
{
|
||||
if (new_args[0])
|
||||
strcat (new_args, " ");
|
||||
strcat (new_args, argument);
|
||||
str_mode[0] = pos[0];
|
||||
str_mode[1] = '\0';
|
||||
strcat (new_modes, str_mode);
|
||||
if (argument)
|
||||
{
|
||||
if (new_args[0])
|
||||
strcat (new_args, " ");
|
||||
strcat (new_args, argument);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user