From 7bfa513bc9892e163060d2af808adadaba948f91 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 8 Oct 2010 11:12:11 +0200 Subject: [PATCH] rpcrt4/tests: Fix a test failure on XP SP3. --- dlls/rpcrt4/tests/ndr_marshall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 569bd2046d5..549d09ee87d 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -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);