Commit 046f24a0 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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

rpcrt4: Raise an exception if a NULL ref-pointer is passed in to PointerMarshall or PointerBufferSize.
parent ec8a27f5
...@@ -871,10 +871,11 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -871,10 +871,11 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
switch (type) { switch (type) {
case RPC_FC_RP: /* ref pointer (always non-null) */ 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) if (!Pointer)
{
ERR("NULL ref pointer is not allowed\n");
RpcRaiseException(RPC_X_NULL_REF_POINTER); RpcRaiseException(RPC_X_NULL_REF_POINTER);
#endif }
pointer_needs_marshaling = 1; pointer_needs_marshaling = 1;
break; break;
case RPC_FC_UP: /* unique pointer */ case RPC_FC_UP: /* unique pointer */
...@@ -1016,6 +1017,11 @@ static void PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -1016,6 +1017,11 @@ static void PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
switch (type) { switch (type) {
case RPC_FC_RP: /* ref pointer (always non-null) */ 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; break;
case RPC_FC_OP: case RPC_FC_OP:
case RPC_FC_UP: case RPC_FC_UP:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment