rpcrt4: Don't try to bind to a null handle.
This commit is contained in:
parent
c8d787dba8
commit
cdf457774d
|
@ -191,14 +191,14 @@ static PFORMAT_STRING client_get_handle(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
context_handle = *(NDR_CCONTEXT *)ARG_FROM_OFFSET(pStubMsg->StackTop, pDesc->offset);
|
context_handle = *(NDR_CCONTEXT *)ARG_FROM_OFFSET(pStubMsg->StackTop, pDesc->offset);
|
||||||
if ((pDesc->flags & NDR_CONTEXT_HANDLE_CANNOT_BE_NULL) &&
|
|
||||||
!context_handle)
|
if (context_handle) *phBinding = NDRCContextBinding(context_handle);
|
||||||
|
else if (pDesc->flags & NDR_CONTEXT_HANDLE_CANNOT_BE_NULL)
|
||||||
{
|
{
|
||||||
ERR("null context handle isn't allowed\n");
|
ERR("null context handle isn't allowed\n");
|
||||||
RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
|
RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*phBinding = NDRCContextBinding(context_handle);
|
|
||||||
/* FIXME: should we store this structure in stubMsg.pContext? */
|
/* FIXME: should we store this structure in stubMsg.pContext? */
|
||||||
return pFormat + sizeof(NDR_EHD_CONTEXT);
|
return pFormat + sizeof(NDR_EHD_CONTEXT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue