Kai Blin : secur32:
Fix off-by-one error when copying the password to the helper.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 24 06:18:25 CST 2007
Module: wine
Branch: master
Commit: dc98ac1adbaf70b6597a5ead75b1c708bcd54bff
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dc98ac1adbaf70b6597a5ead75b1c708bcd54bff
Author: Kai Blin <kai.blin at gmail.com>
Date: Wed Jan 24 10:51:14 2007 +0100
secur32: Fix off-by-one error when copying the password to the helper.
This fixes NTLM authentication with Outlook2003.
---
dlls/secur32/ntlm.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c
index b357250..dec559b 100644
--- a/dlls/secur32/ntlm.c
+++ b/dlls/secur32/ntlm.c
@@ -222,8 +222,9 @@ static SECURITY_STATUS SEC_ENTRY ntlm_Ac
{
helper->pwlen = WideCharToMultiByte(CP_UNIXCP,
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->pwlen);
@@ -232,7 +233,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_Ac
helper->password, helper->pwlen, NULL, NULL);
}
}
-
+
phCredential->dwUpper = fCredentialUse;
phCredential->dwLower = (ULONG_PTR)helper;
TRACE("ACH phCredential->dwUpper: 0x%08lx, dwLower: 0x%08lx\n",
More information about the wine-cvs
mailing list