rpcrt4/tests: Fix a test failure on XP SP3.

This commit is contained in:
Alexandre Julliard 2010-10-08 11:12:11 +02:00
parent f0546a1961
commit 7bfa513bc9
1 changed files with 3 additions and 0 deletions

View File

@ -1543,6 +1543,9 @@ static void test_conformant_string(void)
my_alloc_called = 0;
StubMsg.Buffer = StubMsg.BufferStart;
mem = mem_orig = HeapAlloc(GetProcessHeap(), 0, sizeof(memsrc));
/* Windows apparently checks string length on the output buffer to determine its size... */
memset( mem, 'x', sizeof(memsrc) - 1 );
mem[sizeof(memsrc) - 1] = 0;
NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 0);
ok(mem == mem_orig, "mem not alloced\n");
ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called);