diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-06 18:02:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-06 18:02:31 +0300 |
commit | 3454255df72799b6127def97f1445d39dfb3eda5 (patch) | |
tree | 1c7c38437930bac54d911576c0c20d81327be0a5 | |
parent | 73aaa5881b6bac6caf6f58d2011e62ee19706292 (diff) |
fixes #1049 (memset cannot be used to scrub memory)
-rw-r--r-- | plugins/CryptoPP/src/GPGw/gpg_main.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 2 | ||||
-rw-r--r-- | plugins/Variables/src/parse_str.cpp | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/plugins/CryptoPP/src/GPGw/gpg_main.cpp b/plugins/CryptoPP/src/GPGw/gpg_main.cpp index 5bbbc9f5e3..311d7daa7c 100644 --- a/plugins/CryptoPP/src/GPGw/gpg_main.cpp +++ b/plugins/CryptoPP/src/GPGw/gpg_main.cpp @@ -250,7 +250,7 @@ LPSTR __cdecl _gpg_decrypt(LPCSTR message) if ( gpgresult==gpgSuccess && useridvalid==TRUE)
addPassphrase(keyuserid, passphrase);
- memset(passphrase, 0, sizeof(passphrase));
+ SecureZeroMemory(passphrase, sizeof(passphrase));
size_t decmessagelen = strlen(buffer)+1;
decmessage = (char *) LocalAlloc(LPTR,decmessagelen);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 882efd9083..ab168d8ee0 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -311,7 +311,7 @@ void SendQueue::clearJob(const int iIndex) { SendJob &job = m_jobs[iIndex]; mir_free(job.szSendBuffer); - memset(&job, 0, sizeof(SendJob)); + SecureZeroMemory(&job, sizeof(SendJob)); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index 81207853b1..f13b4a0252 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -486,8 +486,6 @@ static wchar_t *parseStrchr(ARGUMENTSINFO *ai) if (ai->argc != 3)
return nullptr;
- char *szVal[34];
- memset(szVal, 0, sizeof(szVal));
wchar_t *c = wcschr(ai->targv[1], *ai->targv[2]);
if (c == nullptr || *c == 0)
return mir_wstrdup(L"0");
|