Commit 088ae3b8 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

secur32: Fix ntlm_GetCachedCredential to not call strlenW on a NULL pointer.

pszHost should just be set to pszTargetName if pszTargetName doesn't contain any other information.
parent 0be05ab6
...@@ -405,7 +405,10 @@ static BOOL ntlm_GetCachedCredential(const SEC_WCHAR *pszTargetName, PCREDENTIAL ...@@ -405,7 +405,10 @@ static BOOL ntlm_GetCachedCredential(const SEC_WCHAR *pszTargetName, PCREDENTIAL
p = pszHost + strlenW(pszHost); p = pszHost + strlenW(pszHost);
} }
else /* otherwise not an SPN, just a host */ else /* otherwise not an SPN, just a host */
{
pszHost = pszTargetName;
p = pszHost + strlenW(pszHost); p = pszHost + strlenW(pszHost);
}
pszHostOnly = HeapAlloc(GetProcessHeap(), 0, (p - pszHost + 1) * sizeof(WCHAR)); pszHostOnly = HeapAlloc(GetProcessHeap(), 0, (p - pszHost + 1) * sizeof(WCHAR));
if (!pszHostOnly) if (!pszHostOnly)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment