Greg Geldorp : ole32/tests: Fix crashes in usrmarshal.

Alexandre Julliard julliard at winehq.org
Mon Jan 3 10:58:01 CST 2011


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

Author: Greg Geldorp <ggeldorp at vmware.com>
Date:   Sun Jan  2 10:55:07 2011 +0100

ole32/tests: Fix crashes in usrmarshal.

---

 dlls/ole32/tests/usrmarshal.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/ole32/tests/usrmarshal.c b/dlls/ole32/tests/usrmarshal.c
index a40e66b..7fdbdb6 100644
--- a/dlls/ole32/tests/usrmarshal.c
+++ b/dlls/ole32/tests/usrmarshal.c
@@ -182,6 +182,7 @@ static void test_marshal_HGLOBAL(void)
     wirehglobal += sizeof(ULONG);
     ok(*(ULONG *)wirehglobal == 0, "buffer+4 should be HGLOBAL\n");
     init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL);
+    hglobal2 = NULL;
     HGLOBAL_UserUnmarshal(&umcb.Flags, buffer, &hglobal2);
     ok(hglobal2 == hglobal, "Didn't unmarshal properly\n");
     HeapFree(GetProcessHeap(), 0, buffer);
@@ -227,6 +228,7 @@ static void test_marshal_HGLOBAL(void)
             ok(wirehglobal[i] == i, "buffer+0x%x should be %d\n", 0x10 + i, i);
 
         init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL);
+        hglobal2 = NULL;
         HGLOBAL_UserUnmarshal(&umcb.Flags, buffer, &hglobal2);
         ok(hglobal2 != NULL, "Didn't unmarshal properly\n");
         HeapFree(GetProcessHeap(), 0, buffer);




More information about the wine-cvs mailing list