summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-08-30 21:31:51 +0200
committerMasy98 <masy@antheruscraft.de>2014-08-30 21:31:51 +0200
commit2d5a38bd61aa9436f2944f26344b14f92e30f025 (patch)
treed1caaf6446574ffdf676c272e39404ed8184a33b /src/Protocol/Protocol17x.cpp
parentFixed slab name (diff)
parentcChunk: Fixed the Coords param. (diff)
downloadcuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.gz
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.bz2
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.lz
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.xz
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.zst
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-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))
{