restrict check for STARTGAME4 packet length for starcraft client only
https://github.com/pvpgn/pvpgn-server/issues/159
This commit is contained in:
parent
f19ca1afa2
commit
224fed7598
1 changed files with 10 additions and 6 deletions
|
@ -4046,14 +4046,18 @@ namespace pvpgn
|
|||
return -1;
|
||||
}
|
||||
|
||||
// Protection from hack attempt
|
||||
if (conn_get_clienttag(c) == CLIENTTAG_STARCRAFT_UINT || conn_get_clienttag(c) == CLIENTTAG_BROODWARS_UINT)
|
||||
{
|
||||
// FIXME: (HarpyWar) Protection from hack attempt
|
||||
// Large map name size will cause crash Starcraft client for user who select an item in game list ("Join" area)
|
||||
// It occurs when the packet size of packet 0x0c in length interval 161-164
|
||||
// https://github.com/pvpgn/pvpgn-server/issues/159
|
||||
if (packet_get_size(packet) > 160)
|
||||
{
|
||||
eventlog(eventlog_level_error, __FUNCTION__, "[%d] got abnormal STARTGAME4 packet length (got %u bytes, hack attempt?)", conn_get_socket(c), packet_get_size(packet));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Quick hack to make W3 part channels when creating a game
|
||||
if (conn_get_channel(c))
|
||||
|
|
Loading…
Reference in a new issue