diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-04 16:26:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-04 16:26:40 +0000 |
commit | d8e36d0cf116a3d2b87719c601d1057f7452e38b (patch) | |
tree | da5070e78ec26e2024d791352dd6adbb44ee4c04 /src | |
parent | 6f653ddc347d3fc212d2795bdb83d6d74ef555a2 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/mode.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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; |