From 13e0ad8a3fa32b99e7c03c41deb02afa48e0306d Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 15 Dec 2006 15:25:13 +0000 Subject: [PATCH] Handle channel messages from unknown sender. --- apps/irssi/src/silc/core/client_ops.c | 2 ++ apps/irssi/src/silc/core/silc-nicklist.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/irssi/src/silc/core/client_ops.c b/apps/irssi/src/silc/core/client_ops.c index 09654cce..bf0a1881 100644 --- a/apps/irssi/src/silc/core/client_ops.c +++ b/apps/irssi/src/silc/core/client_ops.c @@ -421,6 +421,8 @@ void silc_channel_message(SilcClient client, SilcClientConnection conn, SilcChannelUser chu = silc_client_on_channel(channel, sender); if (chu) nick = silc_nicklist_insert(chanrec, chu, FALSE); + if (!nick) + return; } /* If the messages is digitally signed, verify it, if possible. */ diff --git a/apps/irssi/src/silc/core/silc-nicklist.c b/apps/irssi/src/silc/core/silc-nicklist.c index 6d4b65f8..593c89fd 100644 --- a/apps/irssi/src/silc/core/silc-nicklist.c +++ b/apps/irssi/src/silc/core/silc-nicklist.c @@ -1,7 +1,7 @@ /* silc-nicklist.c : irssi - Copyright (C) 2000, 2003 Timo Sirainen, Pekka Riikonen + Copyright (C) 2000, 2003, 2006 Timo Sirainen, Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ SILC_NICK_REC *silc_nicklist_insert(SILC_CHANNEL_REC *channel, return NULL; if (!user->client) return NULL; - if (!user->client->nickname) + if (!user->client->nickname[0]) return NULL; rec = g_new0(SILC_NICK_REC, 1); @@ -60,7 +60,7 @@ SILC_NICK_REC *silc_nicklist_insert(SILC_CHANNEL_REC *channel, SILC_NICK_REC *silc_nicklist_find(SILC_CHANNEL_REC *channel, SilcClientEntry client) { - if (!client || !client->nickname) + if (!client || !client->nickname[0]) return NULL; return (SILC_NICK_REC *)nicklist_find_unique(CHANNEL(channel), -- 2.24.0