Don't copy strings into themselves

This commit is contained in:
def 2017-06-02 18:37:29 +02:00
parent 533ae0aaf8
commit 814feede33

View file

@ -435,7 +435,8 @@ void CClient::RconAuth(const char *pName, const char *pPassword)
if(RconAuthed()) if(RconAuthed())
return; return;
str_copy(m_RconPassword, pPassword, sizeof(m_RconPassword)); if(pPassword != m_RconPassword)
str_copy(m_RconPassword, pPassword, sizeof(m_RconPassword));
CMsgPacker Msg(NETMSG_RCON_AUTH); CMsgPacker Msg(NETMSG_RCON_AUTH);
Msg.AddString(pName, 32); Msg.AddString(pName, 32);