Robert Shearman : rpcrt4: Correctly fill in StackTop for stubless clients/ servers.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 20 08:45:53 CDT 2006


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

Author: Robert Shearman <rob at codeweavers.com>
Date:   Thu Apr 20 11:41:45 2006 +0100

rpcrt4: Correctly fill in StackTop for stubless clients/servers.

Correctly fill in StackTop for stubless clients/servers so that
conformance for top-level parameters works.

---

 dlls/rpcrt4/ndr_stubless.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index 2563f2c..a7f0b93 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -585,6 +585,8 @@ #else
 #endif
 
     stubMsg.BufferLength = 0;
+    /* needed for conformance of top-level objects */
+    stubMsg.StackTop = *(unsigned char **)args;
 
     /* store the RPC flags away */
     if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS)
@@ -1138,7 +1140,6 @@ #endif
         stubMsg.fHasNewCorrDesc = TRUE;
     }
 
-
     /* convert strings, floating point values and endianess into our
      * preferred format */
     if ((pRpcMsg->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)
@@ -1148,8 +1149,8 @@ #endif
 
     TRACE("allocating memory for stack of size %x\n", stack_size);
 
-    args = HeapAlloc(GetProcessHeap(), 0, stack_size);
-    ZeroMemory(args, stack_size);
+    args = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, stack_size);
+    stubMsg.StackTop = args; /* used by conformance of top-level objects */
 
     /* add the implicit This pointer as the first arg to the function if we
      * are calling an object method */




More information about the wine-cvs mailing list