mirror of
https://github.com/znc/znc.git
synced 2026-05-08 14:24:45 +02:00
Make GetPass() return a CString instead of a char*
In theory this could lead to extra copies of the password in memory, but since no caller actually makes sure that those passwords are forgotten as fast as possible, I don't see why this should be done the Old Way(tm). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1343 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -71,12 +71,10 @@ public:
|
||||
{
|
||||
if (m_sPassword.empty())
|
||||
{
|
||||
char *pTmp = CUtils::GetPass("Enter Encryption Key for " + GetModName() + ".so");
|
||||
CString sTmp = CUtils::GetPass("Enter Encryption Key for " + GetModName() + ".so");
|
||||
|
||||
if (pTmp)
|
||||
m_sPassword = CBlowfish::MD5(pTmp);
|
||||
|
||||
*pTmp = 0;
|
||||
if (!sTmp.empty())
|
||||
m_sPassword = CBlowfish::MD5(sTmp);
|
||||
}
|
||||
|
||||
const vector<CChan *>& vChans = m_pUser->GetChans();
|
||||
|
||||
Reference in New Issue
Block a user