diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-04-16 23:00:56 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-04-16 23:00:56 +0200 |
commit | 9f69e159adcc0892f0bdef16ac4617630737b156 (patch) | |
tree | 861fe4a5bad38148bb2e84480271f22358535545 /src/modules | |
parent | 64faca29b377185c4615c8f2e4eecedc7ad045d1 (diff) |
m_dccallow Validate tokens before use
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_dccallow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index b42d12968..829c1d337 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -339,6 +339,9 @@ class ModuleDCCAllow : public Module while (ss >> buf) tokens.push_back(buf); + if (tokens.size() < 2) + return MOD_RES_PASSTHRU; + irc::string type = tokens[1].c_str(); ConfigTag* conftag = ServerInstance->Config->ConfValue("dccallow"); @@ -346,6 +349,9 @@ class ModuleDCCAllow : public Module if (type == "SEND") { + if (tokens.size() < 3) + return MOD_RES_PASSTHRU; + std::string defaultaction = conftag->getString("action"); std::string filename = tokens[2]; |