Rob Shearman : rpcrt4:
Use the offset to array data in embedded pointer format descriptions.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jun 20 09:13:42 CDT 2007
Module: wine
Branch: master
Commit: 0f826e7cc17f5ec4bf263c1a1e9ddb65b9d369d6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f826e7cc17f5ec4bf263c1a1e9ddb65b9d369d6
Author: Rob Shearman <rob at codeweavers.com>
Date: Tue Jun 19 12:12:00 2007 +0100
rpcrt4: Use the offset to array data in embedded pointer format descriptions.
---
dlls/rpcrt4/ndr_marshall.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index adf7aba..de6f509 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1137,10 +1137,10 @@ static unsigned char * EmbeddedPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
}
for (i = 0; i < rep; i++) {
PFORMAT_STRING info = pFormat;
- unsigned char *membase = pMemory + (i * stride);
- unsigned char *bufbase = Mark + (i * stride);
+ unsigned char *membase = pMemory + ofs + (i * stride);
+ unsigned char *bufbase = Mark + ofs + (i * stride);
unsigned u;
- /* ofs doesn't seem to matter in this context */
+
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
@@ -1210,9 +1210,10 @@ static unsigned char * EmbeddedPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
/* ofs doesn't seem to matter in this context */
for (i = 0; i < rep; i++) {
PFORMAT_STRING info = pFormat;
- unsigned char *membase = *ppMemory + (i * stride);
- unsigned char *bufbase = Mark + (i * stride);
+ unsigned char *membase = *ppMemory + ofs + (i * stride);
+ unsigned char *bufbase = Mark + ofs + (i * stride);
unsigned u;
+
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
@@ -1272,11 +1273,11 @@ static void EmbeddedPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
pFormat += 8;
break;
}
- /* ofs doesn't seem to matter in this context */
for (i = 0; i < rep; i++) {
PFORMAT_STRING info = pFormat;
- unsigned char *membase = pMemory + (i * stride);
+ unsigned char *membase = pMemory + ofs + (i * stride);
unsigned u;
+
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *saved_memory = pStubMsg->Memory;
@@ -1338,7 +1339,7 @@ static unsigned long EmbeddedPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
/* ofs doesn't seem to matter in this context */
for (i = 0; i < rep; i++) {
PFORMAT_STRING info = pFormat;
- unsigned char *bufbase = Mark + (i * stride);
+ unsigned char *bufbase = Mark + ofs + (i * stride);
unsigned u;
for (u=0; u<count; u++,info+=8) {
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
@@ -1395,11 +1396,11 @@ static void EmbeddedPointerFree(PMIDL_STUB_MESSAGE pStubMsg,
pFormat += 8;
break;
}
- /* ofs doesn't seem to matter in this context */
for (i = 0; i < rep; i++) {
PFORMAT_STRING info = pFormat;
unsigned char *membase = pMemory + (i * stride);
unsigned u;
+
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *saved_memory = pStubMsg->Memory;
More information about the wine-cvs
mailing list