summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2008-08-17 17:13:39 +0200
committerAlexander Barton <alex@barton.de>2008-08-17 17:37:36 +0200
commit41a23d20e4bb5dfaebc7be3241addc5251ebc158 (patch)
tree3c1587318ff5ca9975643f7c87d45ec1b5d91b93 /src
parentc769cbecb6214f518135c4bb2a52479747c2bf7b (diff)
downloadngircd-41a23d20e4bb5dfaebc7be3241addc5251ebc158.tar.gz
ngircd-41a23d20e4bb5dfaebc7be3241addc5251ebc158.zip
SECURITY: Fixed a message handling bug which could crash the daemon.
Some message targets could lead to a NULL pointer dereference and therefore
could crash the daemon (denial of service).
(cherry picked from commit e493ad2d30ff80bca2556cde2212e367cb006517)
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index c49a77a4..77cc7c1e 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -397,7 +397,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
 			for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
 				if (Client_Type(cl) != CLIENT_USER)
 					continue;
-				if (nick != NULL) {
+				if (nick != NULL && host != NULL) {
 					if (strcmp(nick, Client_ID(cl)) == 0 &&
 					    strcmp(user, Client_User(cl)) == 0 &&
 					    strcasecmp(host, Client_Hostname(cl)) == 0)