Skip to content

Commit

Permalink
Check sender/receiver.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyp committed Mar 10, 2012
1 parent 0d06f97 commit af5f329
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/netplay/netplay.cpp
Expand Up @@ -1378,6 +1378,11 @@ static bool NETprocessSystemMessage(NETQUEUE playerQueue, uint8_t type)
debug(LOG_ERROR, "Incomplete NET_SEND_TO_PLAYER.");
break;
}
if (sender > MAX_PLAYERS || receiver > MAX_PLAYERS)
{
debug(LOG_ERROR, "Bad NET_SEND_TO_PLAYER.");
break;
}
if ((receiver == selectedPlayer || receiver == NET_ALL_PLAYERS) && playerQueue.index == NetPlay.hostPlayer)
{
// Message was sent to us via the host.
Expand Down

0 comments on commit af5f329

Please sign in to comment.