From d8e36d0cf116a3d2b87719c601d1057f7452e38b Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 4 Oct 2006 16:26:40 +0000 Subject: Extra safety checking in ModeSet just to ensure we cant be passed a null pointer git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5411 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index b32f31dde..54349b51d 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -729,6 +729,9 @@ std::string ModeParser::ModeString(userrec* user, chanrec* channel) std::string types; std::string pars; + if (!channel || !user) + return ""; + for (unsigned char mode = 'A'; mode <= 'z'; mode++) { unsigned char pos = (mode-65) | MASK_CHANNEL; -- cgit v1.2.3