]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_sasl Add missing validation for server-to-server SASL message
authorAttila Molnar <attilamolnar@hush.com>
Thu, 16 Apr 2015 19:13:07 +0000 (21:13 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Thu, 16 Apr 2015 19:13:07 +0000 (21:13 +0200)
src/modules/m_sasl.cpp

index 66efcfe4ee1a5f0918caa4e8de511a4a6d659f6b..b59fd38355f2bfa44ea8338709e88ca86c9a3543 100644 (file)
@@ -99,6 +99,9 @@ class SaslAuthenticator
                        if (msg[0] != this->agent)
                                return this->state;
 
+                       if (msg.size() < 4)
+                               return this->state;
+
                        if (msg[2] == "C")
                                this->user->Write("AUTHENTICATE %s", msg[3].c_str());
                        else if (msg[2] == "D")