[PATCH] setuapi: fixed size to MBtoWC

Marcus Meissner marcus at jet.franken.de
Fri May 17 02:40:08 CDT 2019


Signed-off-by: Marcus Meissner <marcus at jet.franken.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 48b6ca30f0..5135d3f62a 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -3579,7 +3579,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);
 }
-- 
2.21.0




More information about the wine-devel mailing list