rpcrt4: Fix context handle return value unmarshaling.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-01-25 12:01:23 +01:00 committed by Alexandre Julliard
parent b6c48de699
commit 464ba54b4c
1 changed files with 7 additions and 2 deletions

View File

@ -7031,10 +7031,15 @@ static unsigned char *WINAPI NdrContextHandleUnmarshall(
if (pStubMsg->IsClient)
{
NDR_CCONTEXT *ccontext;
if (pFormat[1] & HANDLE_PARAM_IS_VIA_PTR)
ccontext = *(NDR_CCONTEXT **)ppMemory;
else
ccontext = (NDR_CCONTEXT *)ppMemory;
/* [out]-only or [ret] param */
if ((pFormat[1] & (HANDLE_PARAM_IS_IN|HANDLE_PARAM_IS_OUT)) == HANDLE_PARAM_IS_OUT)
**(NDR_CCONTEXT **)ppMemory = NULL;
NdrClientContextUnmarshall(pStubMsg, *(NDR_CCONTEXT **)ppMemory, pStubMsg->RpcMsg->Handle);
*ccontext = NULL;
NdrClientContextUnmarshall(pStubMsg, ccontext, pStubMsg->RpcMsg->Handle);
}
else
{