From fb5a23fadcdf947e354657d19b037bb22c3057e9 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 2 Feb 2008 17:18:25 +0000 Subject: Check for empty prefixes, and close server connections attempting to use them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8788 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index da8af22a0..7c2df1e2a 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -1070,9 +1070,17 @@ bool TreeSocket::ProcessLine(std::string &line) { prefix = params[0].substr(1); params.pop_front(); + + if (prefix.empty()) + { + this->SendError("BUG (??) Empty prefix recieved."); + return false; + } } + command = params[0].c_str(); params.pop_front(); + switch (this->LinkState) { TreeServer* Node; -- cgit v1.2.3