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

irc: return NULL in function irc_message_get_address_from_host if the received host is NULL

This commit is contained in:
Sébastien Helleu
2019-08-03 10:18:25 +02:00
parent 1f52101a41
commit 478ca22054
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -495,6 +495,9 @@ irc_message_get_address_from_host (const char *host)
char host2[256], *pos_space, *pos;
const char *ptr_host;
if (!host)
return NULL;
address[0] = '\0';
if (host)
{
+1 -1
View File
@@ -914,7 +914,7 @@ IRC_PROTOCOL_CALLBACK(chghost)
nick,
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT_HOST,
address,
(address) ? address : "",
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_MESSAGE_CHGHOST,
IRC_COLOR_CHAT_HOST,