mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 15:45:20 +00:00
fix incorrect buffersize passed to MultiByteToWideChar
svn path=/trunk/; revision=36132
This commit is contained in:
parent
eac6a1546a
commit
1eff85acb5
|
@ -2927,7 +2927,7 @@ DWORD RChangeServiceConfigA(
|
|||
lpDisplayName,
|
||||
-1,
|
||||
lpDisplayNameW,
|
||||
(wcslen(lpDisplayNameW) + 1) * sizeof(WCHAR));
|
||||
wcslen(lpDisplayNameW) + 1);
|
||||
|
||||
RegSetValueExW(hServiceKey,
|
||||
L"DisplayName",
|
||||
|
@ -2997,7 +2997,7 @@ DWORD RChangeServiceConfigA(
|
|||
if (lpBinaryPathName != NULL && *lpBinaryPathName != 0)
|
||||
{
|
||||
lpBinaryPathNameW=HeapAlloc(GetProcessHeap(),0, (strlen(lpBinaryPathName)+1) * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpBinaryPathName, -1, lpBinaryPathNameW, (wcslen(lpBinaryPathNameW)+1) * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpBinaryPathName, -1, lpBinaryPathNameW, wcslen(lpBinaryPathNameW)+1);
|
||||
dwError = RegSetValueExW(hServiceKey,
|
||||
L"ImagePath",
|
||||
0,
|
||||
|
@ -3041,7 +3041,7 @@ DWORD RChangeServiceConfigA(
|
|||
lpLoadOrderGroup,
|
||||
-1,
|
||||
lpLoadOrderGroupW,
|
||||
(wcslen(lpLoadOrderGroupW) + 1) * sizeof(WCHAR));
|
||||
wcslen(lpLoadOrderGroupW) + 1);
|
||||
|
||||
dwError = RegSetValueExW(hServiceKey,
|
||||
L"Group",
|
||||
|
@ -3092,7 +3092,7 @@ DWORD RChangeServiceConfigA(
|
|||
lpDependencies,
|
||||
dwDependSize,
|
||||
lpDependenciesW,
|
||||
(wcslen(lpDependenciesW)+1) * sizeof(WCHAR));
|
||||
wcslen(lpDependenciesW)+1);
|
||||
|
||||
dwError = ScmWriteDependencies(hServiceKey,
|
||||
(LPWSTR)lpDependenciesW,
|
||||
|
|
Loading…
Reference in a new issue