mirror of
https://github.com/ioquake/jedi-academy.git
synced 2025-02-13 07:31:46 +00:00
fix buffer overflow in CalculateRanks()
from Thilo Schulz in ioquake3 svn 1866 git a2715bc2831ca32605f0722b34666106a2a4fc27 Fix buffer overflow, reported by Mads Lind
This commit is contained in:
parent
3fa32e5910
commit
df117b922f
1 changed files with 3 additions and 2 deletions
|
@ -1759,9 +1759,10 @@ void CalculateRanks( void ) {
|
|||
level.numNonSpectatorClients = 0;
|
||||
level.numPlayingClients = 0;
|
||||
level.numVotingClients = 0; // don't count bots
|
||||
for ( i = 0; i < TEAM_NUM_TEAMS; i++ ) {
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(level.numteamVotingClients); i++)
|
||||
level.numteamVotingClients[i] = 0;
|
||||
}
|
||||
|
||||
for ( i = 0 ; i < level.maxclients ; i++ ) {
|
||||
if ( level.clients[i].pers.connected != CON_DISCONNECTED ) {
|
||||
level.sortedClients[level.numConnectedClients] = i;
|
||||
|
|
Loading…
Reference in a new issue