Rob Shearman : rpcrt4: Fix uninitialised memory read in ndr_marshall tests.
Module: wine Branch: master Commit: c8f9df7f1e3d2e068d4c76f4db8374afe854957b URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8f9df7f1e3d2e068d4c76f4db... Author: Rob Shearman <robertshearman(a)gmail.com> Date: Sun Nov 29 10:31:05 2009 +0000 rpcrt4: Fix uninitialised memory read in ndr_marshall tests. The memory needs to be initialised since NDR will look at the memory to see if it needs to allocate memory for embedded pointers. --- dlls/rpcrt4/tests/ndr_marshall.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 91f3040..2dfba12 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -258,7 +258,7 @@ static void test_pointer_marshal(const unsigned char *formattypes, StubMsg.Buffer = StubMsg.BufferStart; StubMsg.MemorySize = 0; - mem_orig = mem = HeapAlloc(GetProcessHeap(), 0, size); + mem_orig = mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if(formattypes[1] & 0x10 /* FC_POINTER_DEREF */) *(void**)mem = NULL;
participants (1)
-
Alexandre Julliard