From 690e2cd0719edc23261a5bc166b9958d640fa466 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Fri, 18 Jan 2008 11:28:18 +0000 Subject: [PATCH] rpcrt4: Add support for calculating the memory size of complex types with embedded non-conformant strings. svn path=/trunk/; revision=31857 --- reactos/dll/win32/rpcrt4/ndr_marshall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/dll/win32/rpcrt4/ndr_marshall.c b/reactos/dll/win32/rpcrt4/ndr_marshall.c index b67415ebfd5..eb3cc7e886c 100644 --- a/reactos/dll/win32/rpcrt4/ndr_marshall.c +++ b/reactos/dll/win32/rpcrt4/ndr_marshall.c @@ -2127,6 +2127,7 @@ static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg, case RPC_FC_BOGUS_STRUCT: case RPC_FC_SMFARRAY: case RPC_FC_SMVARRAY: + case RPC_FC_CSTRING: return *(const WORD*)&pFormat[2]; case RPC_FC_USER_MARSHAL: return *(const WORD*)&pFormat[4]; @@ -2141,6 +2142,8 @@ static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg, return *(const SHORT*)pFormat; case RPC_FC_IP: return sizeof(void *); + case RPC_FC_WSTRING: + return *(const WORD*)&pFormat[2] * 2; default: FIXME("unhandled embedded type %02x\n", *pFormat); }