mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 16:18:16 +00:00
- Fix a potential buffer overflow in RChangeServiceConfigA
- Make sure that returned buffers are zero terminated in RQueryServiceConfigA svn path=/trunk/; revision=39424
This commit is contained in:
parent
693252f753
commit
f1011d8bb5
1 changed files with 5 additions and 5 deletions
|
@ -2984,7 +2984,7 @@ DWORD RChangeServiceConfigA(
|
||||||
lpDisplayName,
|
lpDisplayName,
|
||||||
-1,
|
-1,
|
||||||
lpDisplayNameW,
|
lpDisplayNameW,
|
||||||
wcslen(lpDisplayNameW) + 1);
|
strlen(lpDisplayName) + 1);
|
||||||
|
|
||||||
RegSetValueExW(hServiceKey,
|
RegSetValueExW(hServiceKey,
|
||||||
L"DisplayName",
|
L"DisplayName",
|
||||||
|
@ -3620,7 +3620,7 @@ DWORD RQueryServiceConfigA(
|
||||||
lpImagePath,
|
lpImagePath,
|
||||||
-1,
|
-1,
|
||||||
lpStr,
|
lpStr,
|
||||||
wcslen(lpImagePath),
|
wcslen(lpImagePath)+1,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
@ -3639,7 +3639,7 @@ DWORD RQueryServiceConfigA(
|
||||||
lpService->lpGroup->lpGroupName,
|
lpService->lpGroup->lpGroupName,
|
||||||
-1,
|
-1,
|
||||||
lpStr,
|
lpStr,
|
||||||
wcslen(lpService->lpGroup->lpGroupName),
|
wcslen(lpService->lpGroup->lpGroupName)+1,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
@ -3664,7 +3664,7 @@ DWORD RQueryServiceConfigA(
|
||||||
lpServiceStartName,
|
lpServiceStartName,
|
||||||
-1,
|
-1,
|
||||||
lpStr,
|
lpStr,
|
||||||
wcslen(lpServiceStartName),
|
wcslen(lpServiceStartName)+1,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
@ -3683,7 +3683,7 @@ DWORD RQueryServiceConfigA(
|
||||||
lpService->lpDisplayName,
|
lpService->lpDisplayName,
|
||||||
-1,
|
-1,
|
||||||
lpStr,
|
lpStr,
|
||||||
wcslen(lpService->lpDisplayName),
|
wcslen(lpService->lpDisplayName)+1,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue