fix(Core/Packet): fix crash happening when someone sends small packets that is processed directly to WorldSocket (#2669)

This commit is contained in:
Viste
2020-02-22 13:24:08 +03:00
committed by GitHub
parent a7970b711a
commit d387bdc695

View File

@@ -676,7 +676,15 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
switch (opcode)
{
case CMSG_PING:
return HandlePing (*new_pct);
{
try
{
return HandlePing(*new_pct);
}
catch (ByteBufferPositionException const&) {}
sLog->outError("WorldSocket::ReadDataHandler(): client sent malformed CMSG_PING");
return -1;
}
case CMSG_AUTH_SESSION:
if (m_Session)
{