Added verification on NULL pointers
This commit is contained in:
parent
98d5b98465
commit
ae2393539a
@ -55,6 +55,8 @@ static void rail_WindowIcon(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, W
|
||||
}
|
||||
|
||||
window = window_list_get_by_id(rail->list, orderInfo->windowId);
|
||||
if (!window)
|
||||
return ;
|
||||
|
||||
icon = (rdpIcon*) xzalloc(sizeof(rdpIcon));
|
||||
icon->entry = window_icon->iconInfo;
|
||||
|
@ -261,8 +261,9 @@ SECURITY_STATUS SEC_ENTRY ntlm_QueryCredentialsAttributesA(PCredHandle phCredent
|
||||
return SEC_E_UNSUPPORTED_FUNCTION;
|
||||
}
|
||||
|
||||
/* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375512/ */
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/windows/desktop/aa374707
|
||||
*/
|
||||
SECURITY_STATUS SEC_ENTRY ntlm_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext,
|
||||
PSecBufferDesc pInput, uint32 fContextReq, uint32 TargetDataRep, PCtxtHandle phNewContext,
|
||||
PSecBufferDesc pOutput, uint32* pfContextAttr, PTimeStamp ptsTimeStamp)
|
||||
@ -278,6 +279,8 @@ SECURITY_STATUS SEC_ENTRY ntlm_AcceptSecurityContext(PCredHandle phCredential, P
|
||||
if (!context)
|
||||
{
|
||||
context = ntlm_ContextNew();
|
||||
if (!context)
|
||||
return SEC_E_INSUFFICIENT_MEMORY ;
|
||||
context->server = true;
|
||||
|
||||
credentials = (CREDENTIALS*) sspi_SecureHandleGetLowerPointer(phCredential);
|
||||
@ -373,6 +376,9 @@ SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(PCredHandle phCredenti
|
||||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/windows/desktop/aa375512%28v=vs.85%29.aspx
|
||||
*/
|
||||
SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextA(PCredHandle phCredential, PCtxtHandle phContext,
|
||||
SEC_CHAR* pszTargetName, uint32 fContextReq, uint32 Reserved1, uint32 TargetDataRep,
|
||||
PSecBufferDesc pInput, uint32 Reserved2, PCtxtHandle phNewContext,
|
||||
@ -389,6 +395,8 @@ SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextA(PCredHandle phCredenti
|
||||
if (!context)
|
||||
{
|
||||
context = ntlm_ContextNew();
|
||||
if (!context)
|
||||
return SEC_E_INSUFFICIENT_MEMORY ;
|
||||
|
||||
if (fContextReq & ISC_REQ_CONFIDENTIALITY)
|
||||
context->confidentiality = true;
|
||||
@ -416,7 +424,7 @@ SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextA(PCredHandle phCredenti
|
||||
return SEC_E_INVALID_TOKEN;
|
||||
|
||||
if (output_buffer->cbBuffer < 1)
|
||||
return SEC_E_INSUFFICIENT_MEMORY;
|
||||
return SEC_E_INVALID_TOKEN;
|
||||
|
||||
if (context->state == NTLM_STATE_INITIAL)
|
||||
context->state = NTLM_STATE_NEGOTIATE;
|
||||
|
Loading…
Reference in New Issue
Block a user