From 16f608ab9159a6c742a2639bb5bd58c0614b8494 Mon Sep 17 00:00:00 2001 From: nheir Date: Fri, 14 Dec 2018 20:42:32 +0100 Subject: [PATCH] fix: NumClient > MaxClients is invalid --- src/engine/client/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 4cefaacc8..b01ec3600 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -859,7 +859,7 @@ int CClient::UnpackServerInfo(CUnpacker *pUnpacker, CServerInfo *pInfo, int *pTo pInfo->m_NumBotSpectators = 0; // don't add invalid info to the server browser list - if(pInfo->m_NumClients < 0 || pInfo->m_NumClients > MAX_CLIENTS || pInfo->m_MaxClients < 0 || pInfo->m_MaxClients > MAX_CLIENTS || + if(pInfo->m_NumClients < 0 || pInfo->m_NumClients > pInfo->m_MaxClients || pInfo->m_MaxClients < 0 || pInfo->m_MaxClients > MAX_CLIENTS || pInfo->m_NumPlayers < 0 || pInfo->m_NumPlayers > pInfo->m_NumClients || pInfo->m_MaxPlayers < 0 || pInfo->m_MaxPlayers > pInfo->m_MaxClients) return -1; // drop standard gametype with more than MAX_PLAYERS