More packet validation for google protocol buffers.

This commit is contained in:
lotodore
2012-12-31 19:36:18 +01:00
parent 8af3707c09
commit eaa64cbc8c
2 changed files with 259 additions and 65 deletions
+3
View File
@@ -36,6 +36,7 @@
#include <map>
class NetPacket;
class NetGameInfo;
class NetPacketValidator
{
@@ -119,6 +120,8 @@ protected:
static bool ValidateReportGameAckMessage(const NetPacket &packet);
static bool ValidateErrorMessage(const NetPacket &packet);
static bool ValidateGameInfo(const NetGameInfo &gameInfo);
typedef bool (*ValidateFunctor)(const NetPacket &);
typedef std::map<int, ValidateFunctor> ValidateFunctorMap;
private: