From 64d1e2d8e3c5f570be41f7fd568915111dd784f9 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Sat, 22 Dec 2007 01:39:56 +0000 Subject: [PATCH] rpcrt4: Set pStubMsg->BufferMark in NdrConformantVaryingArrayUnmarshall and NdrVaryingArrayUnmarshall. pStubMsg->BufferMark should always be set before EmbeddedPointerUnmarshall is called and these functions didn't previously do so. --- dlls/rpcrt4/ndr_marshall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index c5cebea736c..2db0212f9f0 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2885,6 +2885,7 @@ unsigned char* WINAPI NdrConformantVaryingArrayUnmarshall( PMIDL_STUB_MESSAGE pS if (!*ppMemory || fMustAlloc) *ppMemory = NdrAllocate(pStubMsg, memsize); + pStubMsg->BufferMark = pStubMsg->Buffer; safe_copy_from_buffer(pStubMsg, *ppMemory + pStubMsg->Offset, bufsize); EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, *ppMemory, pFormat, TRUE /* FIXME */); @@ -4515,6 +4516,7 @@ unsigned char * WINAPI NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, if (!*ppMemory || fMustAlloc) *ppMemory = NdrAllocate(pStubMsg, size); + pStubMsg->BufferMark = pStubMsg->Buffer; safe_copy_from_buffer(pStubMsg, *ppMemory + pStubMsg->Offset, bufsize); EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, *ppMemory, pFormat, TRUE /* FIXME */);