diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-18 20:54:49 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-18 20:54:49 +0000 |
commit | 3bbb36695383badf5b3ba0ecba070f16094ae51d (patch) | |
tree | 00d30538acbd91ef4351adb48839df0c6d815bd7 | |
parent | 3c27d028707d8af151e161d90a469f50c0ece758 (diff) |
Fixed a fairly low-risk crash in m_spanningtree
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7042 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index d8b495b49..afba5b96a 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -970,7 +970,10 @@ void TreeSocket::Split(const std::string &line, std::deque<std::string> &n) irc::tokenstream tokens(line); std::string param; while (tokens.GetToken(param)) - n.push_back(param); + { + if (!param.empty()) + n.push_back(param); + } return; } @@ -988,7 +991,10 @@ bool TreeSocket::ProcessLine(std::string &line) Instance->Log(DEBUG, "S[%d] <- %s", this->GetFd(), line.c_str()); this->Split(line.c_str(),params); - + + if (params.empty()) + return true; + if ((params[0][0] == ':') && (params.size() > 1)) { prefix = params[0].substr(1); |