Author: nkinder
Update of /cvs/dirsec/winsync/passwordsync
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30744
Modified Files:
passhand.cpp
Log Message:
186171 - Fixed memory leaks in passhook.dll
Index: passhand.cpp
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/passhand.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- passhand.cpp 18 Mar 2006 00:36:33 -0000 1.8
+++ passhand.cpp 22 Mar 2006 18:51:04 -0000 1.9
@@ -200,11 +200,17 @@
int clearSet(PASS_INFO_LIST* passInfoList)
{
- // ToDo: zero out memory
+ while (!passInfoList->empty()) {
+ PASS_INFO& pi = passInfoList->back();
+ SecureZeroMemory(pi.password, strlen(pi.password));
+ free(pi.password);
+ free(pi.username);
+ passInfoList->pop_back();
+ }
passInfoList->clear();
- return -1;
+ return 0;
}
int encrypt(char* plainTextBuf, int plainTextLen, char* cipherTextBuf, int cipherTextLen,
int* resultTextLen)
Show replies by date