[General] Add basic integrity check to ProxyMasterPacket

This commit is contained in:
David Cernat 2017-05-20 11:04:20 +03:00
parent 17af679c07
commit b0cd636924

View file

@ -29,6 +29,9 @@ namespace mwmp
packet->RW(rulesSize, send);
if (rulesSize > 2000)
rulesSize = 0;
map<string, ServerRule>::iterator ruleIt;
if (send)
ruleIt = server.rules.begin();
@ -71,6 +74,9 @@ namespace mwmp
int playersCount = server.players.size();
packet->RW(playersCount, send);
if (playersCount > 2000)
playersCount = 0;
while (playersCount--)
{
string player;
@ -88,6 +94,9 @@ namespace mwmp
int pluginsCount = server.plugins.size();
packet->RW(pluginsCount, send);
if (pluginsCount > 2000)
pluginsCount = 0;
vector<Plugin>::iterator pluginIt;
if (send)