Author: cwittich
Date: Fri Jan 18 14:25:21 2008
New Revision: 31856
URL:
http://svn.reactos.org/svn/reactos?rev=31856&view=rev
Log:
rpcrt4: Allocate a context handle if a NULL GUID is being unmarshalled. <rob at
codeweavers.com>
Modified:
trunk/reactos/dll/win32/rpcrt4/ndr_contexthandle.c
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_contexthandle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_conte…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/ndr_contexthandle.c (original)
+++ trunk/reactos/dll/win32/rpcrt4/ndr_contexthandle.c Fri Jan 18 14:25:21 2008
@@ -312,6 +312,7 @@
RpcBinding *binding = hBinding;
NDR_SCONTEXT SContext;
RPC_STATUS status;
+ const ndr_context_handle *context_ndr = pBuff;
TRACE("(%p %p %08x %p %u)\n",
hBinding, pBuff, DataRepresentation, CtxGuard, Flags);
@@ -319,12 +320,12 @@
if (!binding->server || !binding->Assoc)
RpcRaiseException(ERROR_INVALID_HANDLE);
- if (!pBuff)
+ if (!pBuff || (!context_ndr->attributes &&
+ UuidIsNil((UUID *)&context_ndr->uuid, &status)))
status = RpcServerAssoc_AllocateContextHandle(binding->Assoc, CtxGuard,
&SContext);
else
{
- const ndr_context_handle *context_ndr = pBuff;
if (context_ndr->attributes)
{
ERR("non-null attributes 0x%x\n", context_ndr->attributes);