Commit dc98ac1a authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

secur32: Fix off-by-one error when copying the password to the helper.

This fixes NTLM authentication with Outlook2003.
parent d05f5f33
...@@ -222,8 +222,9 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW( ...@@ -222,8 +222,9 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
{ {
helper->pwlen = WideCharToMultiByte(CP_UNIXCP, helper->pwlen = WideCharToMultiByte(CP_UNIXCP,
WC_NO_BEST_FIT_CHARS, auth_data->Password, WC_NO_BEST_FIT_CHARS, auth_data->Password,
auth_data->PasswordLength+1, NULL, 0, NULL, NULL); auth_data->PasswordLength+1, NULL, 0, NULL,
NULL) + 1;
helper->password = HeapAlloc(GetProcessHeap(), 0, helper->password = HeapAlloc(GetProcessHeap(), 0,
helper->pwlen); helper->pwlen);
...@@ -232,7 +233,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW( ...@@ -232,7 +233,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
helper->password, helper->pwlen, NULL, NULL); helper->password, helper->pwlen, NULL, NULL);
} }
} }
phCredential->dwUpper = fCredentialUse; phCredential->dwUpper = fCredentialUse;
phCredential->dwLower = (ULONG_PTR)helper; phCredential->dwLower = (ULONG_PTR)helper;
TRACE("ACH phCredential->dwUpper: 0x%08lx, dwLower: 0x%08lx\n", TRACE("ACH phCredential->dwUpper: 0x%08lx, dwLower: 0x%08lx\n",
......
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