From 5c53f05f766458af333a67b22733ae680fba788a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Sep 2006 20:29:53 +0000 Subject: [PATCH] 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 --- include/command_parse.h | 4 ++++ src/command_parse.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 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(); } -- 2.39.5