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/modules/m_operchans.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_operchans.cpp') diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 2e6fad79f..8db2a4041 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -59,7 +59,7 @@ class ModuleOperChans : public Module ModResult OnCheckBan(User *user, Channel *c, const std::string& mask) { - if (mask[0] == 'O' && mask[1] == ':') + if ((mask.length() > 2) && (mask[0] == 'O') && (mask[1] == ':')) { if (IS_OPER(user) && InspIRCd::Match(user->oper->name, mask.substr(2))) return MOD_RES_DENY; -- cgit v1.2.3