secur32: Fix off-by-one error in converting the password to unicode.

This commit is contained in:
Kai Blin 2007-01-24 12:05:33 +01:00 committed by Alexandre Julliard
parent 938e675860
commit 747ab4bf74
1 changed files with 2 additions and 2 deletions

View File

@ -332,12 +332,12 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleA(
if(identity->PasswordLength != 0)
{
passwd_sizeW = MultiByteToWideChar(CP_ACP, 0,
(LPCSTR)identity->Password, identity->PasswordLength+1,
(LPCSTR)identity->Password, identity->PasswordLength,
NULL, 0);
passwd = HeapAlloc(GetProcessHeap(), 0, passwd_sizeW
* sizeof(SEC_WCHAR));
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)identity->Password,
identity->PasswordLength+1, passwd, passwd_sizeW);
identity->PasswordLength, passwd, passwd_sizeW);
}
else
{