From 8caa325eb7e5225a042622d8f8199adb1aa488a1 Mon Sep 17 00:00:00 2001 From: Dan Hipschman Date: Fri, 2 Nov 2007 15:22:47 -0700 Subject: [PATCH] rpcrt4: Initialize allocated pointers to NULL in PointerUnmarshall. This patch initializes allocated pointers in PointerUnmarshall since later code checks the value for NULL (specifically, NdrConformantArrayUnmarshall). --- dlls/rpcrt4/ndr_marshall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 7be2ee69c56..16c38a0f907 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -976,8 +976,10 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, if (pointer_needs_unmarshaling) { if (attr & RPC_FC_P_DEREF) { - if (!*pPointer || fMustAlloc) + if (!*pPointer || fMustAlloc) { *pPointer = NdrAllocate(pStubMsg, sizeof(void *)); + *(unsigned char**) *pPointer = NULL; + } pPointer = *(unsigned char***)pPointer; TRACE("deref => %p\n", pPointer); } -- 2.11.4.GIT