summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-21 21:38:57 +0200
committerMattes D <github@xoft.cz>2014-08-21 21:38:57 +0200
commitd471ee8a9d93d1c793db316b00dcc8eddcdc2c2a (patch)
tree9fa88ddb19b518b1c3e0418a896f8de4cb8beaf0 /src/Protocol/Protocol17x.cpp
parentSorted the generated param count. (diff)
downloadcuberite-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 '')
-rw-r--r--src/Protocol/Protocol17x.cpp6
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))
{