Marcus Meissner : ntdll: Fix buffer size to MultiByteToWideChar.

Alexandre Julliard julliard at winehq.org
Tue Aug 28 16:53:02 CDT 2018


Module: wine
Branch: master
Commit: 0c790adf300dd37f624029023bc6de53cb21373c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0c790adf300dd37f624029023bc6de53cb21373c

Author: Marcus Meissner <meissner at suse.de>
Date:   Tue Aug 28 13:23:14 2018 +0200

ntdll: Fix buffer size to MultiByteToWideChar.

Signed-off-by: Marcus Meissner <meissner at suse.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/path.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index 7baf474..722ca99 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.c
@@ -512,7 +512,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
 
     for (i = 0; i < ARRAY_SIZE(tests); ++i)
     {
-        MultiByteToWideChar(CP_ACP, 0, tests[i].dos, -1, path, sizeof(path));
+        MultiByteToWideChar(CP_ACP, 0, tests[i].dos, -1, path, ARRAY_SIZE(path));
         ret = pRtlDosPathNameToNtPathName_U(path, &nameW, &file_part, NULL);
 
         if (pRtlDosPathNameToNtPathName_U_WithStatus)
@@ -534,7 +534,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
             continue;
         }
 
-        MultiByteToWideChar(CP_ACP, 0, tests[i].nt, -1, path, sizeof(path));
+        MultiByteToWideChar(CP_ACP, 0, tests[i].nt, -1, path, ARRAY_SIZE(path));
         ok(!lstrcmpW(nameW.Buffer, path), "%s: Expected %s, got %s.\n",
             tests[i].dos, tests[i].nt, wine_dbgstr_w(nameW.Buffer));
 




More information about the wine-cvs mailing list