Robert Shearman : rpcrt4: Make sure to set a unique pointer with an id of 0 to NULL when unmarshaling .

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


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

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

rpcrt4: Make sure to set a unique pointer with an id of 0 to NULL when unmarshaling.

---

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

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 8b66899..3fdfaf5 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -833,8 +833,10 @@ static void PointerUnmarshall(PMIDL_STUB
     TRACE("pointer_id is 0x%08lx\n", pointer_id);
     if (pointer_id)
       pointer_needs_unmarshaling = 1;
-    else
+    else {
+      *pPointer = NULL;
       pointer_needs_unmarshaling = 0;
+    }
     break;
   case RPC_FC_OP: /* object pointer - we must free data before overwriting it */
     pointer_id = NDR_LOCAL_UINT32_READ(Buffer);




More information about the wine-cvs mailing list