Robert Shearman : rpcrt4:
Fix the pointer count used when handling embedded pointers in varying
arrays .
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Jun 3 05:24:28 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 678ad6286c8a4b833f5b27ce323bbbb54ebabe61
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=678ad6286c8a4b833f5b27ce323bbbb54ebabe61
Author: Robert Shearman <rob at codeweavers.com>
Date: Fri Jun 2 20:25:44 2006 +0100
rpcrt4: Fix the pointer count used when handling embedded pointers in varying arrays.
---
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 83fc9be..5a1f057 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1073,7 +1073,7 @@ static unsigned char * EmbeddedPointerMa
pFormat += 10;
break;
case RPC_FC_VARIABLE_REPEAT:
- rep = pStubMsg->MaxCount;
+ rep = (pFormat[1] == RPC_FC_VARIABLE_OFFSET) ? pStubMsg->ActualCount : pStubMsg->MaxCount;
stride = *(const WORD*)&pFormat[2];
ofs = *(const WORD*)&pFormat[4];
count = *(const WORD*)&pFormat[6];
@@ -1145,7 +1145,7 @@ static unsigned char * EmbeddedPointerUn
pFormat += 10;
break;
case RPC_FC_VARIABLE_REPEAT:
- rep = pStubMsg->MaxCount;
+ rep = (pFormat[1] == RPC_FC_VARIABLE_OFFSET) ? pStubMsg->ActualCount : pStubMsg->MaxCount;
stride = *(const WORD*)&pFormat[2];
ofs = *(const WORD*)&pFormat[4];
count = *(const WORD*)&pFormat[6];
@@ -1210,7 +1210,7 @@ static void EmbeddedPointerBufferSize(PM
pFormat += 10;
break;
case RPC_FC_VARIABLE_REPEAT:
- rep = pStubMsg->MaxCount;
+ rep = (pFormat[1] == RPC_FC_VARIABLE_OFFSET) ? pStubMsg->ActualCount : pStubMsg->MaxCount;
stride = *(const WORD*)&pFormat[2];
ofs = *(const WORD*)&pFormat[4];
count = *(const WORD*)&pFormat[6];
@@ -1273,7 +1273,7 @@ static unsigned long EmbeddedPointerMemo
pFormat += 10;
break;
case RPC_FC_VARIABLE_REPEAT:
- rep = pStubMsg->MaxCount;
+ rep = (pFormat[1] == RPC_FC_VARIABLE_OFFSET) ? pStubMsg->ActualCount : pStubMsg->MaxCount;
stride = *(const WORD*)&pFormat[2];
ofs = *(const WORD*)&pFormat[4];
count = *(const WORD*)&pFormat[6];
@@ -1333,7 +1333,7 @@ static void EmbeddedPointerFree(PMIDL_ST
pFormat += 10;
break;
case RPC_FC_VARIABLE_REPEAT:
- rep = pStubMsg->MaxCount;
+ rep = (pFormat[1] == RPC_FC_VARIABLE_OFFSET) ? pStubMsg->ActualCount : pStubMsg->MaxCount;
stride = *(const WORD*)&pFormat[2];
ofs = *(const WORD*)&pFormat[4];
count = *(const WORD*)&pFormat[6];
More information about the wine-cvs
mailing list