From adcc14bdf9e112b990c69455d9822130078a1504 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 6 Sep 2014 16:51:32 +0000 Subject: [PATCH] [RPCRT4] EmbeddedPointerBufferSize and EmbeddedPointerMarshall: Store the pointer to the current array element in the stub message. This fixes buffer size calculation for arrays that contain structs with embedded pointer. This patch will also be submitted to the WINE project. svn path=/trunk/; revision=64053 --- reactos/dll/win32/rpcrt4/ndr_marshall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/rpcrt4/ndr_marshall.c b/reactos/dll/win32/rpcrt4/ndr_marshall.c index 51795467e49..857419b5a1c 100644 --- a/reactos/dll/win32/rpcrt4/ndr_marshall.c +++ b/reactos/dll/win32/rpcrt4/ndr_marshall.c @@ -1193,7 +1193,7 @@ static unsigned char * EmbeddedPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *bufptr = bufbase + *(const SHORT*)&info[2]; unsigned char *saved_memory = pStubMsg->Memory; - pStubMsg->Memory = pMemory; + pStubMsg->Memory = membase; PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4); pStubMsg->Memory = saved_memory; } @@ -1347,7 +1347,7 @@ static void EmbeddedPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *memptr = membase + *(const SHORT*)&info[0]; unsigned char *saved_memory = pStubMsg->Memory; - pStubMsg->Memory = pMemory; + pStubMsg->Memory = membase; PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4); pStubMsg->Memory = saved_memory; }