Robert Shearman : rpcrt4: Handle more structure padding values.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 18 05:13:24 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 9318cb0fbc09eb29b303794e5686dcea95e00e03
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=9318cb0fbc09eb29b303794e5686dcea95e00e03
Author: Robert Shearman <rob at codeweavers.com>
Date: Mon Jul 17 20:19:14 2006 +0100
rpcrt4: Handle more structure padding values.
---
dlls/rpcrt4/ndr_marshall.c | 40 +++++++++++++++++++++++++++++++++++-----
include/wine/rpcfc.h | 6 ++++++
2 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index b6ff54d..e1adfa0 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1734,8 +1734,14 @@ static unsigned char * ComplexMarshall(P
case RPC_FC_ALIGNM8:
ALIGN_POINTER(pMemory, 8);
break;
+ case RPC_FC_STRUCTPAD1:
case RPC_FC_STRUCTPAD2:
- pMemory += 2;
+ case RPC_FC_STRUCTPAD3:
+ case RPC_FC_STRUCTPAD4:
+ case RPC_FC_STRUCTPAD5:
+ case RPC_FC_STRUCTPAD6:
+ case RPC_FC_STRUCTPAD7:
+ pMemory += *pFormat - RPC_FC_STRUCTPAD1 + 1;
break;
case RPC_FC_EMBEDDED_COMPLEX:
pMemory += pFormat[1];
@@ -1808,8 +1814,14 @@ static unsigned char * ComplexUnmarshall
case RPC_FC_ALIGNM8:
ALIGN_POINTER(pMemory, 8);
break;
+ case RPC_FC_STRUCTPAD1:
case RPC_FC_STRUCTPAD2:
- pMemory += 2;
+ case RPC_FC_STRUCTPAD3:
+ case RPC_FC_STRUCTPAD4:
+ case RPC_FC_STRUCTPAD5:
+ case RPC_FC_STRUCTPAD6:
+ case RPC_FC_STRUCTPAD7:
+ pMemory += *pFormat - RPC_FC_STRUCTPAD1 + 1;
break;
case RPC_FC_EMBEDDED_COMPLEX:
pMemory += pFormat[1];
@@ -1876,8 +1888,14 @@ static unsigned char * ComplexBufferSize
case RPC_FC_ALIGNM8:
ALIGN_POINTER(pMemory, 8);
break;
+ case RPC_FC_STRUCTPAD1:
case RPC_FC_STRUCTPAD2:
- pMemory += 2;
+ case RPC_FC_STRUCTPAD3:
+ case RPC_FC_STRUCTPAD4:
+ case RPC_FC_STRUCTPAD5:
+ case RPC_FC_STRUCTPAD6:
+ case RPC_FC_STRUCTPAD7:
+ pMemory += *pFormat - RPC_FC_STRUCTPAD1 + 1;
break;
case RPC_FC_EMBEDDED_COMPLEX:
pMemory += pFormat[1];
@@ -1939,8 +1957,14 @@ static unsigned char * ComplexFree(PMIDL
case RPC_FC_ALIGNM8:
ALIGN_POINTER(pMemory, 8);
break;
+ case RPC_FC_STRUCTPAD1:
case RPC_FC_STRUCTPAD2:
- pMemory += 2;
+ case RPC_FC_STRUCTPAD3:
+ case RPC_FC_STRUCTPAD4:
+ case RPC_FC_STRUCTPAD5:
+ case RPC_FC_STRUCTPAD6:
+ case RPC_FC_STRUCTPAD7:
+ pMemory += *pFormat - RPC_FC_STRUCTPAD1 + 1;
break;
case RPC_FC_EMBEDDED_COMPLEX:
pMemory += pFormat[1];
@@ -2003,8 +2027,14 @@ static unsigned long ComplexStructMemory
ALIGN_LENGTH(size, 8);
ALIGN_POINTER(pStubMsg->Buffer, 8);
break;
+ case RPC_FC_STRUCTPAD1:
case RPC_FC_STRUCTPAD2:
- size += 2;
+ case RPC_FC_STRUCTPAD3:
+ case RPC_FC_STRUCTPAD4:
+ case RPC_FC_STRUCTPAD5:
+ case RPC_FC_STRUCTPAD6:
+ case RPC_FC_STRUCTPAD7:
+ size += *pFormat - RPC_FC_STRUCTPAD1 + 1;
break;
case RPC_FC_EMBEDDED_COMPLEX:
size += pFormat[1];
diff --git a/include/wine/rpcfc.h b/include/wine/rpcfc.h
index 9e1003c..fb479dd 100644
--- a/include/wine/rpcfc.h
+++ b/include/wine/rpcfc.h
@@ -88,7 +88,13 @@ #define RPC_FC_POINTER 0x36
#define RPC_FC_ALIGNM4 0x38
#define RPC_FC_ALIGNM8 0x39
+#define RPC_FC_STRUCTPAD1 0x3d
#define RPC_FC_STRUCTPAD2 0x3e
+#define RPC_FC_STRUCTPAD3 0x3f
+#define RPC_FC_STRUCTPAD4 0x40
+#define RPC_FC_STRUCTPAD5 0x41
+#define RPC_FC_STRUCTPAD6 0x42
+#define RPC_FC_STRUCTPAD7 0x43
#define RPC_FC_STRING_SIZED 0x44
More information about the wine-cvs
mailing list