From 85f8f30a6548a181f41f378160d66477098b275e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 12 Mar 2009 11:51:35 +0100 Subject: [PATCH] rpcrt4: Use RpcMsg->Buffer instead of BufferStart since the latter isn't always set. --- dlls/rpcrt4/ndr_marshall.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index b29186ca1e1..e983f610525 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -3278,13 +3278,13 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, /* get the buffer pointer after complex array data, but before * pointer data */ - pStubMsg->BufferLength = pStubMsg->Buffer - pStubMsg->BufferStart; + pStubMsg->BufferLength = pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer; pStubMsg->IgnoreEmbeddedPointers = 1; NdrComplexStructBufferSize(pStubMsg, pMemory, pFormat); pStubMsg->IgnoreEmbeddedPointers = saved_ignore_embedded; /* save it for use by embedded pointer code later */ - pStubMsg->PointerBufferMark = pStubMsg->BufferStart + pStubMsg->BufferLength; + pStubMsg->PointerBufferMark = (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength; TRACE("difference = 0x%x\n", pStubMsg->PointerBufferMark - pStubMsg->Buffer); pointer_buffer_mark_set = 1; @@ -3840,14 +3840,14 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, /* get the buffer pointer after complex array data, but before * pointer data */ - pStubMsg->BufferLength = pStubMsg->Buffer - pStubMsg->BufferStart; + pStubMsg->BufferLength = pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer; pStubMsg->IgnoreEmbeddedPointers = 1; NdrComplexArrayBufferSize(pStubMsg, pMemory, pFormat); pStubMsg->IgnoreEmbeddedPointers = saved_ignore_embedded; /* save it for use by embedded pointer code later */ - pStubMsg->PointerBufferMark = pStubMsg->BufferStart + pStubMsg->BufferLength; - TRACE("difference = 0x%x\n", pStubMsg->Buffer - pStubMsg->BufferStart); + pStubMsg->PointerBufferMark = (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength; + TRACE("difference = 0x%x\n", pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer); pointer_buffer_mark_set = 1; /* restore fields */ -- 2.11.4.GIT