]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/uid.cpp
Fix m_chanlog crashing.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / uid.cpp
index 4e81bf2af37588a7c4701cf93933fe85a7003c5c..a6689d2f74962e9448cd9872b9509950c3707d80 100644 (file)
@@ -49,7 +49,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
        std::string empty;
 
        /* XXX probably validate UID length too -- w00t */
-       cmd_validation valid[] = { {"Nickname", 2, NICKMAX}, {"Hostname", 3, 64}, {"Displayed hostname", 4, 64}, {"Ident", 5, IDENTMAX}, {"GECOS", 9, MAXGECOS}, {"", 0, 0} };
+       cmd_validation valid[] = { {"Nickname", 2, NICKMAX}, {"Hostname", 3, 64}, {"Displayed hostname", 4, 64}, {"Ident", 5, IDENTMAX + 1}, {"GECOS", 9, MAXGECOS}, {"", 0, 0} };
 
        TreeServer* remoteserver = Utils->FindServer(source);
 
@@ -113,7 +113,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
        strlcpy(_new->host, params[3].c_str(),64);
        strlcpy(_new->dhost, params[4].c_str(),64);
        _new->server = this->Instance->FindServerNamePtr(remoteserver->GetName().c_str());
-       strlcpy(_new->ident, params[5].c_str(),IDENTMAX);
+       strlcpy(_new->ident, params[5].c_str(),IDENTMAX + 1);
        strlcpy(_new->fullname, params[9].c_str(),MAXGECOS);
        _new->registered = REG_ALL;
        _new->signon = signon;