mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Don't allow stringcmd's if client isn't active
Potential exploit vector, executing stringcmd's during signon states where it shouldn't be used.
This commit is contained in:
parent
9a9d6b290a
commit
30031e3275
@ -167,6 +167,11 @@ bool CClient::VProcessStringCmd(CClient* pClient, NET_StringCmd* pMsg)
|
||||
char* pShifted = reinterpret_cast<char*>(pClient) - 8;
|
||||
CClient* pClient_Adj = reinterpret_cast<CClient*>(pShifted);
|
||||
#endif // !GAMEDLL_S0 || !GAMEDLL_S1
|
||||
|
||||
// Jettison the cmd if the client isn't active.
|
||||
if (!pClient_Adj->IsActive())
|
||||
return true;
|
||||
|
||||
int nUserID = pClient_Adj->GetUserID();
|
||||
ServerPlayer_t* pSlot = &g_ServerPlayer[nUserID];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user