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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 24 06:18:41 CST 2007


Module: wine
Branch: master
Commit: 747ab4bf7406c8142897bdbfb9db7389f6186cd5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=747ab4bf7406c8142897bdbfb9db7389f6186cd5

Author: Kai Blin <kai.blin at gmail.com>
Date:   Wed Jan 24 12:05:33 2007 +0100

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

---

 dlls/secur32/ntlm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c
index dec559b..39c16c2 100644
--- a/dlls/secur32/ntlm.c
+++ b/dlls/secur32/ntlm.c
@@ -332,12 +332,12 @@ static SECURITY_STATUS SEC_ENTRY ntlm_Ac
             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
             {




More information about the wine-cvs mailing list