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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user