Commit 747ab4bf authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

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

parent 938e6758
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment