1
0

Protocol 1.8: Fixed possible crash on malformed packet.

This commit is contained in:
madmaxoft 2014-09-28 22:25:48 +02:00
parent 5a44be13b7
commit f8c627141a

View File

@ -1713,6 +1713,11 @@ void cProtocol180::AddReceivedData(const char * a_Data, size_t a_Size)
{
UInt32 NumBytesRead = m_ReceivedData.GetReadableSpace();
m_ReceivedData.ReadVarInt(CompressedSize);
if (CompressedSize > PacketLen)
{
m_Client->Kick("Bad compression");
return;
}
if (CompressedSize > 0)
{
// Decompress the data: