rpcrt4: Raise an exception if a NULL ref-pointer is passed in to PointerMarshall or PointerBufferSize.

This commit is contained in:
Rob Shearman 2007-11-20 18:03:18 +00:00 committed by Alexandre Julliard
parent ec8a27f573
commit 046f24a0e7
1 changed files with 8 additions and 2 deletions

View File

@ -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: