Author: ekohl Date: Sat Sep 6 16:51:32 2014 New Revision: 64053
URL: http://svn.reactos.org/svn/reactos?rev=64053&view=rev Log: [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.
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_marsha... ============================================================================== --- trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c [iso-8859-1] Sat Sep 6 16:51:32 2014 @@ -1193,7 +1193,7 @@ 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 @@ 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; }