diff --git a/tester/liblinphone_tester_windows.cpp b/tester/liblinphone_tester_windows.cpp
index 30fab9c9af7d059ad8a9da1863658013cd192434..a1e064da67b3e596424614cc86dc8db0a66bfe7e 100644
--- a/tester/liblinphone_tester_windows.cpp
+++ b/tester/liblinphone_tester_windows.cpp
@@ -8,7 +8,7 @@ using namespace Windows::Foundation;
 using namespace Windows::Storage;
 using namespace Windows::System::Threading;
 
-#define MAX_TRACE_SIZE		512
+#define MAX_TRACE_SIZE		2048
 #define MAX_SUITE_NAME_SIZE	128
 #define MAX_WRITABLE_DIR_SIZE 1024
 
@@ -19,11 +19,11 @@ LibLinphoneTester^ LibLinphoneTester::_instance = ref new LibLinphoneTester();
 static void nativeOutputTraceHandler(int lev, const char *fmt, va_list args)
 {
 	if (sTraceListener) {
-		wchar_t wstr[MAX_TRACE_SIZE];
+		wchar_t wstr[MAX_TRACE_SIZE] = { 0 };
 		std::string str;
 		str.resize(MAX_TRACE_SIZE);
 		vsnprintf((char *)str.c_str(), MAX_TRACE_SIZE, fmt, args);
-		mbstowcs(wstr, str.c_str(), sizeof(wstr));
+		mbstowcs(wstr, str.c_str(), MAX_TRACE_SIZE - 1);
 		String^ msg = ref new String(wstr);
 		String^ l;
 		switch (lev) {