[PATCH] rpcrt4: Properly size complex reference pointers.
Henri Verbeet
hverbeet at codeweavers.com
Thu Sep 22 14:40:06 CDT 2011
---
dlls/rpcrt4/ndr_stubless.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index b68ff32..5eb699e 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -149,6 +149,15 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
DWORD size;
switch(*pFormat)
{
+ case RPC_FC_RP:
+ if (pFormat[1] & RPC_FC_P_SIMPLEPOINTER)
+ {
+ FIXME("Simple reference pointer (type %#x).\n", pFormat[2]);
+ size = sizeof(void *);
+ break;
+ }
+ size = calc_arg_size(pStubMsg, &pFormat[2] + *(WORD *)&pFormat[2]);
+ break;
case RPC_FC_STRUCT:
case RPC_FC_PSTRUCT:
size = *(const WORD*)(pFormat + 2);
@@ -202,8 +211,6 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
break;
default:
FIXME("Unhandled type %02x\n", *pFormat);
- /* fallthrough */
- case RPC_FC_RP:
size = sizeof(void *);
break;
}
--
1.7.3.4
More information about the wine-patches
mailing list