1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

irc: fix crash in split of IRC message containing a newline if the server is not given

This commit is contained in:
Sébastien Helleu
2024-05-25 19:28:49 +02:00
parent 6b1d55203b
commit f968bb9c91
3 changed files with 19 additions and 2 deletions
+3 -2
View File
@@ -1683,8 +1683,9 @@ irc_message_split (struct t_irc_server *server, const char *message)
}
multiline = (
((weechat_strcasecmp (command, "privmsg") == 0)
|| (weechat_strcasecmp (command, "notice") == 0))
server
&& ((weechat_strcasecmp (command, "privmsg") == 0)
|| (weechat_strcasecmp (command, "notice") == 0))
&& message
&& strchr (message, '\n')
&& (index_args + 1 <= argc - 1)