Rob Shearman : rpcrt4: Raise an exception if a NULL ref-pointer is passed in to PointerMarshall or PointerBufferSize .
Alexandre Julliard
julliard at winehq.org
Wed Nov 21 07:47:40 CST 2007
Module: wine
Branch: master
Commit: 046f24a0e740533f4ffc9851b3b26935b7c3ed43
URL: http://source.winehq.org/git/wine.git/?a=commit;h=046f24a0e740533f4ffc9851b3b26935b7c3ed43
Author: Rob Shearman <rob at codeweavers.com>
Date: Tue Nov 20 18:03:18 2007 +0000
rpcrt4: Raise an exception if a NULL ref-pointer is passed in to PointerMarshall or PointerBufferSize.
---
dlls/rpcrt4/ndr_marshall.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 0590203..57a442c 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -871,10 +871,11 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
switch (type) {
case RPC_FC_RP: /* ref pointer (always non-null) */
-#if 0 /* this causes problems for InstallShield so is disabled - we need more tests */
if (!Pointer)
+ {
+ ERR("NULL ref pointer is not allowed\n");
RpcRaiseException(RPC_X_NULL_REF_POINTER);
-#endif
+ }
pointer_needs_marshaling = 1;
break;
case RPC_FC_UP: /* unique pointer */
@@ -1016,6 +1017,11 @@ static void PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
switch (type) {
case RPC_FC_RP: /* ref pointer (always non-null) */
+ if (!Pointer)
+ {
+ ERR("NULL ref pointer is not allowed\n");
+ RpcRaiseException(RPC_X_NULL_REF_POINTER);
+ }
break;
case RPC_FC_OP:
case RPC_FC_UP:
More information about the wine-cvs
mailing list