secur32: Don't try to set an empty target name in schan_InitializeSecurityContextW.

Based on original patch by Nikos Mavrogiannopoulos.
This commit is contained in:
Bruno Jesus 2015-04-08 23:54:36 -03:00 committed by Alexandre Julliard
parent f58c11767a
commit 0fbbb1297d

View File

@ -825,7 +825,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
return SEC_E_INTERNAL_ERROR;
}
if (pszTargetName)
if (pszTargetName && *pszTargetName)
{
UINT len = WideCharToMultiByte( CP_UNIXCP, 0, pszTargetName, -1, NULL, 0, NULL, NULL );
char *target = HeapAlloc( GetProcessHeap(), 0, len );