mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
[ADVAPI32]
- Correctly handle NULL passwords for services. Patch by Hermès Bélusca. Fixes crash in advapi32_winetest:service. See bug 7239, bug 7293. svn path=/trunk/; revision=57150
This commit is contained in:
@@ -309,7 +309,7 @@ ChangeServiceConfigA(SC_HANDLE hService,
|
||||
|
||||
/* FIXME: Encrypt the password */
|
||||
lpEncryptedPassword = (LPBYTE)lpPassword;
|
||||
dwPasswordLength = (strlen(lpPassword) + 1) * sizeof(CHAR);
|
||||
dwPasswordLength = (lpPassword ? (strlen(lpPassword) + 1) * sizeof(CHAR) : 0);
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
@@ -387,7 +387,7 @@ ChangeServiceConfigW(SC_HANDLE hService,
|
||||
|
||||
/* FIXME: Encrypt the password */
|
||||
lpEncryptedPassword = (LPBYTE)lpPassword;
|
||||
dwPasswordLength = (wcslen(lpPassword) + 1) * sizeof(WCHAR);
|
||||
dwPasswordLength = (lpPassword ? (wcslen(lpPassword) + 1) * sizeof(WCHAR) : 0);
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
@@ -577,7 +577,7 @@ CreateServiceA(SC_HANDLE hSCManager,
|
||||
|
||||
/* FIXME: Encrypt the password */
|
||||
lpEncryptedPassword = (LPBYTE)lpPassword;
|
||||
dwPasswordLength = (strlen(lpPassword) + 1) * sizeof(CHAR);
|
||||
dwPasswordLength = (lpPassword ? (strlen(lpPassword) + 1) * sizeof(CHAR) : 0);
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
@@ -671,7 +671,7 @@ CreateServiceW(SC_HANDLE hSCManager,
|
||||
|
||||
/* FIXME: Encrypt the password */
|
||||
lpEncryptedPassword = (LPBYTE)lpPassword;
|
||||
dwPasswordLength = (wcslen(lpPassword) + 1) * sizeof(WCHAR);
|
||||
dwPasswordLength = (lpPassword ? (wcslen(lpPassword) + 1) * sizeof(WCHAR) : 0);
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user