[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH 1/2] secur32: Fix handling of ANSI NTLM credentials
From: Hans Leidekker <hans () codeweavers ! com>
Date: 2016-05-26 8:46:48
Message-ID: 1464252408.27450.83.camel () codeweavers ! com
[Download RAW message or body]
On Thu, 2016-05-26 at 08:07 +0000, Alistair Leslie-Hughes wrote:
> --- a/dlls/secur32/ntlm.c
> +++ b/dlls/secur32/ntlm.c
> @@ -174,27 +174,74 @@ SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
> if(pAuthData != NULL)
> {
> PSEC_WINNT_AUTH_IDENTITY_W auth_data = pAuthData;
> + LPWSTR domain = NULL, user = NULL, password = NULL;
> + int domain_len = 0, user_len = 0, password_len = 0;
>
> - TRACE("Username is %s\n", debugstr_wn(auth_data->User, \
> auth_data->UserLength));
> - TRACE("Domain name is %s\n", debugstr_wn(auth_data->Domain, \
> auth_data->DomainLength)); + if (auth_data->Flags & \
> SEC_WINNT_AUTH_IDENTITY_ANSI) + {
> + if (auth_data->DomainLength)
> + {
> + domain_len = MultiByteToWideChar(CP_ACP, 0, (char \
> *)auth_data->Domain, + \
> auth_data->DomainLength, NULL, 0); + domain = \
> HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * domain_len); + \
> MultiByteToWideChar(CP_ACP, 0, (char *)auth_data->Domain, auth_data->DomainLength, \
> + domain, domain_len);
Please check the result of HeapAlloc calls.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic