diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-13 20:29:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-13 20:29:53 +0000 |
commit | 5c53f05f766458af333a67b22733ae680fba788a (patch) | |
tree | 2a29dcd2438d0169f35a95fcfaae1e949e9b5ef7 | |
parent | 92bfb4ef78d392d22abd2b867796be24d1dc901e (diff) |
If inspircd crashes in std::string destructor in CommandParser::ProcessCommand, take away all std::string's to make the bug manifest elsewhere, so maybe we can spot it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5232 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/command_parse.h | 4 | ||||
-rw-r--r-- | src/command_parse.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/command_parse.h b/include/command_parse.h index 40c3425fb..682489ad5 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -38,6 +38,10 @@ class CommandParser : public classbase */ InspIRCd* ServerInstance; + /** Parameter buffer + */ + std::vector<std::string> para; + /** Process a parameter string into a list of items * @param command_p The output list of items * @param parameters The input string diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 5cc85a2a3..a158ff6a3 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -315,7 +315,6 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd) { const char *command_p[127]; int items = 0; - std::string para[127]; irc::tokenstream tokens(cmd); std::string command = tokens.GetToken(); @@ -477,6 +476,7 @@ bool CommandParser::CreateCommand(command_t *f, void* so_handle) CommandParser::CommandParser(InspIRCd* Instance) : ServerInstance(Instance) { + para.resize(128); this->SetupCommandTable(); } |