Alexandre Julliard : rpcrt4: Use RpcMsg-> Buffer instead of BufferStart since the latter isn't always set.
Alexandre Julliard
julliard at winehq.org
Thu Mar 12 09:54:28 CDT 2009
Module: wine
Branch: master
Commit: 85f8f30a6548a181f41f378160d66477098b275e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=85f8f30a6548a181f41f378160d66477098b275e
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Mar 12 11:51:35 2009 +0100
rpcrt4: Use RpcMsg->Buffer instead of BufferStart since the latter isn't always set.
---
dlls/rpcrt4/ndr_marshall.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index b29186c..e983f61 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 */
More information about the wine-cvs
mailing list