Alexandre Julliard : rpcrt4: Don't try to bind to a null handle.
Alexandre Julliard
julliard at winehq.org
Fri Jun 10 11:16:20 CDT 2011
Module: wine
Branch: master
Commit: cdf457774d4310c6af65af69472a5090fbcd93d5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cdf457774d4310c6af65af69472a5090fbcd93d5
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jun 9 17:45:14 2011 +0200
rpcrt4: Don't try to bind to a null handle.
---
dlls/rpcrt4/ndr_stubless.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index f7bd670..0f54211 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -191,14 +191,14 @@ static PFORMAT_STRING client_get_handle(
}
else
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");
RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
return NULL;
}
- *phBinding = NDRCContextBinding(context_handle);
/* FIXME: should we store this structure in stubMsg.pContext? */
return pFormat + sizeof(NDR_EHD_CONTEXT);
}
More information about the wine-cvs
mailing list