From 0652e7a4c88151bf1bf708ffc75a7a98d18775da Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 2 Nov 2013 17:46:37 +0100 Subject: ProtoProxy: Fixed handling of incomplete packets. --- Tools/ProtoProxy/Connection.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Tools/ProtoProxy') diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp index b99415900..143935fe5 100644 --- a/Tools/ProtoProxy/Connection.cpp +++ b/Tools/ProtoProxy/Connection.cpp @@ -718,6 +718,7 @@ bool cConnection::DecodeServersPackets(const char * a_Data, int a_Size) ) { // Not a complete packet yet + m_ServerBuffer.ResetRead(); break; } UInt32 PacketType, PacketReadSoFar; @@ -2683,6 +2684,7 @@ bool cConnection::HandleServerWindowOpen(void) bool cConnection::HandleServerUnknownPacket(UInt32 a_PacketType, UInt32 a_PacketLen, UInt32 a_PacketReadSoFar) { AString Data; + ASSERT(a_PacketLen >= a_PacketReadSoFar); if (!m_ServerBuffer.ReadString(Data, a_PacketLen - a_PacketReadSoFar)) { return false; -- cgit v1.2.3