Rob Shearman : rpcrt4: Add support for calculating the memory size of complex types with embedded non-conformant strings .

Alexandre Julliard julliard at winehq.org
Mon Jan 14 09:33:16 CST 2008


Module: wine
Branch: master
Commit: 97b842c817c9f603bfa45cb61441ee0398bcc402
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=97b842c817c9f603bfa45cb61441ee0398bcc402

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sun Jan 13 20:52:54 2008 +0000

rpcrt4: Add support for calculating the memory size of complex types with embedded non-conformant strings.

---

 dlls/rpcrt4/ndr_marshall.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 8d358cf..d99fbf9 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -2126,6 +2126,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];
@@ -2140,6 +2141,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);
   }




More information about the wine-cvs mailing list