diff options
author | Mattes D <github@xoft.cz> | 2014-08-21 21:38:57 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-21 21:38:57 +0200 |
commit | d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a (patch) | |
tree | 9fa88ddb19b518b1c3e0418a896f8de4cb8beaf0 /src/Protocol/Protocol17x.cpp | |
parent | Sorted the generated param count. (diff) | |
download | cuberite-d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a.tar cuberite-d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a.tar.gz cuberite-d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a.tar.bz2 cuberite-d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a.tar.lz cuberite-d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a.tar.xz cuberite-d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a.tar.zst cuberite-d471ee8a9d93d1c793db316b00dcc8eddcdc2c2a.zip |
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index a8df948cd..1091b877f 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1824,7 +1824,11 @@ void cProtocol172::HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffe void cProtocol172::HandlePacketLoginStart(cByteBuffer & a_ByteBuffer) { AString Username; - a_ByteBuffer.ReadVarUTF8String(Username); + if (!a_ByteBuffer.ReadVarUTF8String(Username)) + { + m_Client->Kick("Bad username"); + return; + } if (!m_Client->HandleHandshake(Username)) { |