mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 02:50:55 +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,
|
lpDisplayName,
|
||||||
-1,
|
-1,
|
||||||
lpDisplayNameW,
|
lpDisplayNameW,
|
||||||
(wcslen(lpDisplayNameW) + 1) * sizeof(WCHAR));
|
wcslen(lpDisplayNameW) + 1);
|
||||||
|
|
||||||
RegSetValueExW(hServiceKey,
|
RegSetValueExW(hServiceKey,
|
||||||
L"DisplayName",
|
L"DisplayName",
|
||||||
|
@ -2997,7 +2997,7 @@ DWORD RChangeServiceConfigA(
|
||||||
if (lpBinaryPathName != NULL && *lpBinaryPathName != 0)
|
if (lpBinaryPathName != NULL && *lpBinaryPathName != 0)
|
||||||
{
|
{
|
||||||
lpBinaryPathNameW=HeapAlloc(GetProcessHeap(),0, (strlen(lpBinaryPathName)+1) * sizeof(WCHAR));
|
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,
|
dwError = RegSetValueExW(hServiceKey,
|
||||||
L"ImagePath",
|
L"ImagePath",
|
||||||
0,
|
0,
|
||||||
|
@ -3041,7 +3041,7 @@ DWORD RChangeServiceConfigA(
|
||||||
lpLoadOrderGroup,
|
lpLoadOrderGroup,
|
||||||
-1,
|
-1,
|
||||||
lpLoadOrderGroupW,
|
lpLoadOrderGroupW,
|
||||||
(wcslen(lpLoadOrderGroupW) + 1) * sizeof(WCHAR));
|
wcslen(lpLoadOrderGroupW) + 1);
|
||||||
|
|
||||||
dwError = RegSetValueExW(hServiceKey,
|
dwError = RegSetValueExW(hServiceKey,
|
||||||
L"Group",
|
L"Group",
|
||||||
|
@ -3092,7 +3092,7 @@ DWORD RChangeServiceConfigA(
|
||||||
lpDependencies,
|
lpDependencies,
|
||||||
dwDependSize,
|
dwDependSize,
|
||||||
lpDependenciesW,
|
lpDependenciesW,
|
||||||
(wcslen(lpDependenciesW)+1) * sizeof(WCHAR));
|
wcslen(lpDependenciesW)+1);
|
||||||
|
|
||||||
dwError = ScmWriteDependencies(hServiceKey,
|
dwError = ScmWriteDependencies(hServiceKey,
|
||||||
(LPWSTR)lpDependenciesW,
|
(LPWSTR)lpDependenciesW,
|
||||||
|
|
Loading…
Reference in a new issue