Marcus Meissner : setupapi: Fix size to MultiByteToWideChar().

Alexandre Julliard julliard at winehq.org
Fri May 17 16:10:14 CDT 2019


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Fri May 17 09:40:08 2019 +0200

setupapi: Fix size to MultiByteToWideChar().

Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 943f7bb..5a49247 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -3596,7 +3596,7 @@ BOOL WINAPI SetupDiSetDeviceInstallParamsA(HDEVINFO devinfo,
     paramsW.FileQueue = params->FileQueue;
     paramsW.ClassInstallReserved = params->ClassInstallReserved;
     paramsW.Reserved = params->Reserved;
-    MultiByteToWideChar(CP_ACP, 0, params->DriverPath, -1, paramsW.DriverPath, sizeof(paramsW.DriverPath));
+    MultiByteToWideChar(CP_ACP, 0, params->DriverPath, -1, paramsW.DriverPath, ARRAY_SIZE(paramsW.DriverPath));
 
     return SetupDiSetDeviceInstallParamsW(devinfo, device_data, &paramsW);
 }




More information about the wine-cvs mailing list