Rob Shearman : secur32: Fix ntlm_GetCachedCredential to not call strlenW on a NULL pointer.
Module: wine Branch: master Commit: 088ae3b81c7387f98c217260484207cbf175e2d6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=088ae3b81c7387f98c21726048... Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Mar 10 16:41:55 2008 +0000 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. --- dlls/secur32/ntlm.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index 5b95d92..f971fc1 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -405,7 +405,10 @@ static BOOL ntlm_GetCachedCredential(const SEC_WCHAR *pszTargetName, PCREDENTIAL p = pszHost + strlenW(pszHost); } else /* otherwise not an SPN, just a host */ + { + pszHost = pszTargetName; p = pszHost + strlenW(pszHost); + } pszHostOnly = HeapAlloc(GetProcessHeap(), 0, (p - pszHost + 1) * sizeof(WCHAR)); if (!pszHostOnly)
participants (1)
-
Alexandre Julliard