secur32: fix to conversion of password in NTLM AcquireCredentialsHandleA

Kai Blin blin at gmx.net
Fri Dec 9 05:16:11 CST 2005


When converting the password from multibyte to widechar, the end of
string character
wasn't accounted for. Thanks to Marcus Meissner for pointing that out.

Changelog:
Kai Blin  <blin at gmx.net>
Fix multibyte to widechar conversion of password in
AcquireCredentialsHandleA.
-- 
Kai Blin, (blin at gmx dot net)
Emacs, n.:
	A slow-moving parody of a text editor.
-------------- next part --------------
b49b8d9fa1f11c0a723eb5db9de9d68d427d600c
diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c
index 94715b5..3de699f 100644
--- a/dlls/secur32/ntlm.c
+++ b/dlls/secur32/ntlm.c
@@ -353,7 +353,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_Ac
                 passwd = HeapAlloc(GetProcessHeap(), 0, passwd_sizeW
                     * sizeof(SEC_WCHAR));
                 MultiByteToWideChar(CP_ACP, 0, (LPCSTR)identity->Password,
-                    identity->PasswordLength, passwd, passwd_sizeW);
+                    identity->PasswordLength+1, passwd, passwd_sizeW);
             }
             else
             {


More information about the wine-patches mailing list