Changeset 66307 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Mar 28, 2017 3:05:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvCredential.cpp
r66260 r66307 167 167 AssertPtrReturn(pwszSource, E_POINTER); 168 168 169 size_t cbLen = (RTUtf16Len(pwszSource) + 1 /* Trailing zero */) * sizeof(WCHAR);169 size_t cbLen = RTUtf16Len(pwszSource) * sizeof(RTUTF16); 170 170 171 171 pUnicodeDest->Buffer = (LPWSTR)CoTaskMemAlloc(cbLen); … … 196 196 197 197 /* Make sure to wipe contents before free'ing. */ 198 RTMemWipeThoroughly(pUnicode->Buffer, pUnicode->MaximumLength * sizeof(WCHAR), 3 /* Passes */);198 RTMemWipeThoroughly(pUnicode->Buffer, pUnicode->MaximumLength /* MaximumLength is bytes! */, 3 /* Passes */); 199 199 200 200 CoTaskMemFree(pUnicode->Buffer); … … 322 322 + pLogonIn->Password.Length; 323 323 324 VBoxCredProvVerbose(3, "VBoxCredProvCredential::AllocateLogonPackage: Allocating %ld bytes (%zu bytes credentials)\n", 324 #ifdef DEBUG /* Do not reveal any hints to credential data in release mode. */ 325 VBoxCredProvVerbose(1, "VBoxCredProvCredential::AllocateLogonPackage: Allocating %ld bytes (%zu bytes credentials)\n", 325 326 cbLogon, cbLogon - sizeof(KERB_INTERACTIVE_UNLOCK_LOGON)); 327 #endif 326 328 327 329 KERB_INTERACTIVE_UNLOCK_LOGON *pLogon = (KERB_INTERACTIVE_UNLOCK_LOGON*)CoTaskMemAlloc(cbLogon); … … 1041 1043 /* We're done -- let the logon UI know. */ 1042 1044 *pcpGetSerializationResponse = CPGSR_RETURN_CREDENTIAL_FINISHED; 1045 1046 VBoxCredProvVerbose(1, "VBoxCredProvCredential::GetSerialization: Finished for user '%ls' (domain '%s')\n", 1047 m_apwszCredentials[VBOXCREDPROV_FIELDID_USERNAME], 1048 m_apwszCredentials[VBOXCREDPROV_FIELDID_DOMAINNAME]); 1043 1049 } 1044 1050 else … … 1061 1067 VBoxCredProvVerbose(1, "VBoxCredProvCredential::GetSerialization: kerberosLogonCreate failed with hr=0x%08x\n", hr); 1062 1068 1063 VBoxCredProvVerbose( 0, "VBoxCredProvCredential::GetSerialization returned hr=0x%08x\n", hr);1069 VBoxCredProvVerbose(1, "VBoxCredProvCredential::GetSerialization returned hr=0x%08x\n", hr); 1064 1070 return hr; 1065 1071 }
Note:
See TracChangeset
for help on using the changeset viewer.