summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Burchell <viroteck@viroteck.net>2012-05-28 04:23:57 -0700
committerRobin Burchell <viroteck@viroteck.net>2012-05-28 04:23:57 -0700
commit52458f91f1c03294d8edf2f264051b8e1e25f853 (patch)
treede2b2a9c665863072bf5fd10b31a0313523d3ee6
parent20a91b6bc458a9f5c531a93dbe6b8d5083a3fd0d (diff)
parentcf4b99e9c6cdd5675fb7b36870fecf83edffa7af (diff)
Merge pull request #152 from attilamolnar/insp20+showwhoisfix
[2.0] m_showwhois Fix potential crash in WHOISNOTICE handler
-rw-r--r--src/modules/m_showwhois.cpp3
1 files changed, 3 insertions, 0 deletions
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<std::string> &parameters, User *user)
{
User* dest = ServerInstance->FindNick(parameters[0]);
+ if (!dest)
+ return CMD_FAILURE;
+
User* source = ServerInstance->FindNick(parameters[1]);
if (IS_LOCAL(dest) && source)