summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_login.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-02 17:34:53 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-02 17:34:53 +0000
commit904cc94d119a5b7952cffe35e9023035a7a0c21c (patch)
treed37fcdbe0652fb9cb8fb3e95a60547c3ec043fb6 /protocols/SkypeWeb/src/skype_login.cpp
parent1945b7e33c81e127e93e33c60b0dd62c11a0df1c (diff)
SkypeWeb: zero memory with password
git-svn-id: http://svn.miranda-ng.org/main/trunk@14820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_login.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_login.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp
index da844ae286..ab650a5e0e 100644
--- a/protocols/SkypeWeb/src/skype_login.cpp
+++ b/protocols/SkypeWeb/src/skype_login.cpp
@@ -25,9 +25,9 @@ void CSkypeProto::Login()
m_iStatus = ID_STATUS_CONNECTING;
requestQueue->Start();
int tokenExpires(getDword("TokenExpiresIn", 0));
- ptrA login(getStringA(SKYPE_SETTINGS_ID));
- ptrA password(getStringA(SKYPE_SETTINGS_PASSWORD));
- if (login == NULL || password == NULL)
+ ptrA szLogin(getStringA(SKYPE_SETTINGS_ID));
+ ptrA szPassword(getStringA(SKYPE_SETTINGS_PASSWORD));
+ if (szLogin == NULL || szPassword == NULL)
{
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGIN_ERROR_UNKNOWN);
return;
@@ -37,11 +37,12 @@ void CSkypeProto::Login()
OnLoginSuccess();
else
{
- if (strstr(login, "@"))
+ if (strchr(szLogin, '@'))
SendRequest(new LoginMSRequest(), &CSkypeProto::OnMSLoginFirst);
else
- SendRequest(new LoginOAuthRequest(login, password), &CSkypeProto::OnLoginOAuth);
+ SendRequest(new LoginOAuthRequest(szLogin, szPassword), &CSkypeProto::OnLoginOAuth);
}
+ SecureZeroMemory(szPassword, mir_strlen(szPassword));
}
void CSkypeProto::OnLoginOAuth(const NETLIBHTTPREQUEST *response)