Robert Shearman : rpcrt4: Align the buffer correctly when marshaling and unmarshaling context handles .

Alexandre Julliard julliard at wine.codeweavers.com
Sat Jun 3 05:24:31 CDT 2006


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

Author: Robert Shearman <rob at codeweavers.com>
Date:   Fri Jun  2 20:44:18 2006 +0100

rpcrt4: Align the buffer correctly when marshaling and unmarshaling context handles.

---

 dlls/rpcrt4/ndr_marshall.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 03f5c6c..240ca75 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -4345,7 +4345,10 @@ void WINAPI NdrClientContextMarshall(PMI
                                      NDR_CCONTEXT ContextHandle,
                                      int fCheck)
 {
-    TRACE("(%p, %p, %d): stub\n", pStubMsg, ContextHandle, fCheck);
+    TRACE("(%p, %p, %d)\n", pStubMsg, ContextHandle, fCheck);
+
+    ALIGN_POINTER(pStubMsg->Buffer, 4);
+
     /* FIXME: what does fCheck do? */
     NDRCContextMarshall(ContextHandle,
                         pStubMsg->Buffer);
@@ -4360,7 +4363,10 @@ void WINAPI NdrClientContextUnmarshall(P
                                        NDR_CCONTEXT * pContextHandle,
                                        RPC_BINDING_HANDLE BindHandle)
 {
-    TRACE("(%p, %p, %p): stub\n", pStubMsg, pContextHandle, BindHandle);
+    TRACE("(%p, %p, %p)\n", pStubMsg, pContextHandle, BindHandle);
+
+    ALIGN_POINTER(pStubMsg->Buffer, 4);
+
     NDRCContextUnmarshall(pContextHandle,
                           BindHandle,
                           pStubMsg->Buffer,




More information about the wine-cvs mailing list