[PATCH] ntdll: fixed buffer size to MultiByteToWideChar

Marcus Meissner meissner at suse.de
Tue Aug 28 06:23:14 CDT 2018


Signed-off-by: Marcus Meissner <meissner at suse.de>
---
 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 7baf474ec1..722ca99d2d 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));
 
-- 
2.18.0




More information about the wine-devel mailing list