From 6b14ac1562dda1492e7ca44c2306e2432200b8cc Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Wed, 3 Oct 2012 02:50:20 +0200 Subject: Check if the mask is long enough before accessing it when checking extbans --- src/channels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/channels.cpp') 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('@'); -- cgit v1.2.3