From cf4b99e9c6cdd5675fb7b36870fecf83edffa7af Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 28 May 2012 01:28:36 +0200 Subject: m_showwhois Fix potential crash in WHOISNOTICE handler --- src/modules/m_showwhois.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules/m_showwhois.cpp') diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 691887429..6eec64bd5 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -76,6 +76,9 @@ class WhoisNoticeCmd : public Command CmdResult Handle(const std::vector ¶meters, User *user) { User* dest = ServerInstance->FindNick(parameters[0]); + if (!dest) + return CMD_FAILURE; + User* source = ServerInstance->FindNick(parameters[1]); if (IS_LOCAL(dest) && source) -- cgit v1.2.3