Add snap check for dummy

This commit is contained in:
ChillerDragon 2020-01-21 22:20:09 +01:00
parent 49168da784
commit ee825f42e9

View file

@ -2087,7 +2087,7 @@ void CClient::ProcessServerPacketDummy(CNetChunk *pPacket)
pData = (const char *)Unpacker.GetRaw(PartSize);
if(Unpacker.Error() || NumParts < 1 || Part < 0 || PartSize < 0)
if(Unpacker.Error() || NumParts < 1 || NumParts > CSnapshot::MAX_PARTS || Part < 0 || Part >= NumParts || PartSize < 0 || PartSize > MAX_SNAPSHOT_PACKSIZE)
return;
if(GameTick >= m_CurrentRecvTick[!g_Config.m_ClDummy])