summaryrefslogtreecommitdiff
path: root/src/modules/m_channelban.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-10-03 02:50:20 +0200
committerattilamolnar <attilamolnar@hush.com>2012-10-03 03:22:22 +0200
commit6b14ac1562dda1492e7ca44c2306e2432200b8cc (patch)
tree6017e0421a2fd00fdd508be679833e8538186037 /src/modules/m_channelban.cpp
parentb5b17f22e98ce06bc639edede60784bb1988a9e5 (diff)
Check if the mask is long enough before accessing it when checking extbans
Diffstat (limited to 'src/modules/m_channelban.cpp')
-rw-r--r--src/modules/m_channelban.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp
index 655ed82cd..8c5962f2a 100644
--- a/src/modules/m_channelban.cpp
+++ b/src/modules/m_channelban.cpp
@@ -42,7 +42,7 @@ class ModuleBadChannelExtban : public Module
ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
{
- if (mask[0] == 'j' && mask[1] == ':')
+ if ((mask.length() > 2) && (mask[0] == 'j') && (mask[1] == ':'))
{
std::string rm = mask.substr(2);
char status = 0;