From 747ab4bf7406c8142897bdbfb9db7389f6186cd5 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 24 Jan 2007 12:05:33 +0100 Subject: [PATCH] secur32: Fix off-by-one error in converting the password to unicode. --- dlls/secur32/ntlm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index dec559b0390..39c16c27529 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -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 {