1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 04:46:17 +00:00

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)
This commit is contained in:
Alexander Barton 2008-08-17 17:13:39 +02:00
parent c769cbecb6
commit 41a23d20e4

View File

@ -397,7 +397,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) { for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
if (Client_Type(cl) != CLIENT_USER) if (Client_Type(cl) != CLIENT_USER)
continue; continue;
if (nick != NULL) { if (nick != NULL && host != NULL) {
if (strcmp(nick, Client_ID(cl)) == 0 && if (strcmp(nick, Client_ID(cl)) == 0 &&
strcmp(user, Client_User(cl)) == 0 && strcmp(user, Client_User(cl)) == 0 &&
strcasecmp(host, Client_Hostname(cl)) == 0) strcasecmp(host, Client_Hostname(cl)) == 0)