Robert Shearman : rpcrt4: We should never pass an fMustAlloc value of TRUE into the

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 30 05:56:49 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: df57b025c69649e6a80cdb7efe088c7a69f64281
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=df57b025c69649e6a80cdb7efe088c7a69f64281

Author: Robert Shearman <rob at codeweavers.com>
Date:   Mon May 29 16:34:36 2006 +0100

rpcrt4: We should never pass an fMustAlloc value of TRUE into the
unmarshaler routines of embedded complexes in complex struct and array
unmarshaling.

Fixes a regression caused by commit
19fad8e71032707cb036239f69f085e1b0249d01, reported by Ulrich
Dobramysl.

---

 dlls/rpcrt4/ndr_marshall.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 3fdfaf5..09012bc 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1698,8 +1698,7 @@ static unsigned char * ComplexMarshall(P
 static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
                                          unsigned char *pMemory,
                                          PFORMAT_STRING pFormat,
-                                         PFORMAT_STRING pPointer,
-                                         unsigned char fMustAlloc)
+                                         PFORMAT_STRING pPointer)
 {
   PFORMAT_STRING desc;
   NDR_UNMARSHALL m;
@@ -1745,7 +1744,7 @@ static unsigned char * ComplexUnmarshall
       TRACE("embedded complex (size=%ld) => %p\n", size, pMemory);
       m = NdrUnmarshaller[*desc & NDR_TABLE_MASK];
       memset(pMemory, 0, size); /* just in case */
-      if (m) m(pStubMsg, &pMemory, desc, fMustAlloc);
+      if (m) m(pStubMsg, &pMemory, desc, FALSE);
       else FIXME("no unmarshaller for embedded type %02x\n", *desc);
       pMemory += size;
       pFormat += 2;
@@ -1991,7 +1990,7 @@ unsigned char * WINAPI NdrComplexStructU
   if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat;
   pFormat += 2;
 
-  pMemory = ComplexUnmarshall(pStubMsg, *ppMemory, pFormat, pointer_desc, fMustAlloc);
+  pMemory = ComplexUnmarshall(pStubMsg, *ppMemory, pFormat, pointer_desc);
 
   if (conf_array)
     NdrConformantArrayUnmarshall(pStubMsg, &pMemory, conf_array, fMustAlloc);
@@ -2449,7 +2448,7 @@ unsigned char * WINAPI NdrComplexArrayUn
   pMemory = *ppMemory;
   count = pStubMsg->ActualCount;
   for (i = 0; i < count; i++)
-    pMemory = ComplexUnmarshall(pStubMsg, pMemory, pFormat, NULL, fMustAlloc);
+    pMemory = ComplexUnmarshall(pStubMsg, pMemory, pFormat, NULL);
 
   return NULL;
 }




More information about the wine-cvs mailing list