summaryrefslogtreecommitdiff
path: root/src/channels.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/channels.cpp
parentb5b17f22e98ce06bc639edede60784bb1988a9e5 (diff)
Check if the mask is long enough before accessing it when checking extbans
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 855fd0e15..883ae3954 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -449,7 +449,7 @@ bool Channel::CheckBan(User* user, const std::string& mask)
return (result == MOD_RES_DENY);
// extbans were handled above, if this is one it obviously didn't match
- if (mask[1] == ':')
+ if ((mask.length() <= 2) || (mask[1] == ':'))
return false;
std::string::size_type at = mask.find('@');