From 1742449ad8497d100d34f534b30ef6ecafa56d57 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 4 May 2014 20:33:18 +0400 Subject: [PATCH] msxml3/tests: Null-terminate a string before A->W conversion (Valgrind). --- dlls/msxml3/tests/saxreader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index 1032b8cdc78..646984fa11d 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -3297,8 +3297,9 @@ static void test_mxwriter_flush(void) ok(pos2.QuadPart == 0, "expected stream beginning\n"); len = 2048; - buff = HeapAlloc(GetProcessHeap(), 0, len); + buff = HeapAlloc(GetProcessHeap(), 0, len+1); memset(buff, 'A', len); + buff[len] = 0; hr = ISAXContentHandler_characters(content, _bstr_(buff), len); EXPECT_HR(hr, S_OK); @@ -3344,6 +3345,7 @@ todo_wine ok(pos2.QuadPart == 0, "expected stream beginning\n"); memset(buff, 'A', len); + buff[len] = 0; hr = ISAXContentHandler_characters(content, _bstr_(buff), len - 8); EXPECT_HR(hr, S_OK); @@ -3368,6 +3370,7 @@ todo_wine EXPECT_HR(hr, S_OK); memset(buff, 'A', len); + buff[len] = 0; hr = ISAXContentHandler_characters(content, _bstr_(buff), len); EXPECT_HR(hr, S_OK);