From eb8a6f70f5beac6d0da189a090cb580a3dd334b4 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Thu, 31 Jul 2008 19:49:52 +0200 Subject: [PATCH] kernel32/tests: Fix a wrong length passed to a WideCharToMultiByte test, which led to a use of uninitialized stack memory. --- dlls/kernel32/tests/codepage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c index a20a306d493..0c5d6978a64 100644 --- a/dlls/kernel32/tests/codepage.c +++ b/dlls/kernel32/tests/codepage.c @@ -285,8 +285,8 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); /* Double-byte tests */ - ret = WideCharToMultiByte(1252, 0, dbwcs, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - ok(ret == 5, "ret is %d\n", ret); + ret = WideCharToMultiByte(1252, 0, dbwcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ok(ret == 3, "ret is %d\n", ret); ok(!strcmp(mbs, "??"), "mbs is %s\n", mbs); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); -- 2.11.4.GIT