Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/synctools/passwordsync
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30812
Modified Files:
Tag: Directory71RtmBranch
passhand.cpp
Log Message:
186171 - Fixed memory leaks in passhook.dll
Index: passhand.cpp
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/synctools/passwordsync/passhand.cpp,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -r1.7.2.1 -r1.7.2.2
--- passhand.cpp 18 Mar 2006 00:31:54 -0000 1.7.2.1
+++ passhand.cpp 22 Mar 2006 18:53:26 -0000 1.7.2.2
@@ -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