diff --git a/rehlds/HLTV/Proxy/src/ProxyClient.cpp b/rehlds/HLTV/Proxy/src/ProxyClient.cpp index 82bdd27..2e47233 100644 --- a/rehlds/HLTV/Proxy/src/ProxyClient.cpp +++ b/rehlds/HLTV/Proxy/src/ProxyClient.cpp @@ -86,6 +86,11 @@ bool ProxyClient::ProcessStringCmd(char *string) return true; } + if (!cmdLine.CountToken()) { + m_System->DPrintf("WARNING! ProxyClient::ProcessStringCmd: invalid command string.\n"); + return false; + } + char *cmd = cmdLine.GetToken(0); for (auto& local_cmd : m_LocalCmdReg) { diff --git a/rehlds/HLTV/common/BaseClient.cpp b/rehlds/HLTV/common/BaseClient.cpp index 0c3a433..9f10489 100644 --- a/rehlds/HLTV/common/BaseClient.cpp +++ b/rehlds/HLTV/common/BaseClient.cpp @@ -266,6 +266,11 @@ bool BaseClient::ProcessStringCmd(char *string) return false; } + if (!cmdLine.CountToken()) { + m_System->DPrintf("WARNING! BaseClient::ProcessStringCmd: invalid command string.\n"); + return false; + } + char *cmd = cmdLine.GetToken(0); for (auto& local_cmd : m_LocalCmdReg) {