rpcrt4: Handle more structure padding values.

This commit is contained in:
Robert Shearman 2006-07-17 20:19:14 +01:00 committed by Alexandre Julliard
parent ad6b0dc281
commit 9318cb0fbc
2 changed files with 41 additions and 5 deletions

View File

@ -1734,8 +1734,14 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
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(PMIDL_STUB_MESSAGE pStubMsg,
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(PMIDL_STUB_MESSAGE pStubMsg,
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_STUB_MESSAGE pStubMsg,
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 ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
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];

View File

@ -88,7 +88,13 @@
#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