[PATCH] setupapi: fixed size passed to MultiByteToWideChar

Marcus Meissner meissner at suse.de
Thu Nov 29 06:30:21 CST 2018


Signed-off-by: Marcus Meissner <meissner at suse.de>
---
 dlls/setupapi/devinst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 55fca897c3..ae7a575302 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -1351,7 +1351,7 @@ BOOL WINAPI SetupDiCreateDeviceInfoA(HDEVINFO DeviceInfoSet, const char *name,
         return FALSE;
     }
 
-    MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, sizeof(nameW));
+    MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, ARRAY_SIZE(nameW));
 
     if (DeviceDescription)
     {
-- 
2.19.1




More information about the wine-devel mailing list