adjust the pointers on the server side to match what the client is sending

svn path=/trunk/; revision=28914
This commit is contained in:
Ged Murphy 2007-09-07 10:55:16 +00:00
parent dae207d99a
commit fd90cd9c8a

View file

@ -2294,15 +2294,13 @@ ScmrChangeServiceConfig2W(handle_t BindingHandle,
if (dwInfoLevel & SERVICE_CONFIG_DESCRIPTION) if (dwInfoLevel & SERVICE_CONFIG_DESCRIPTION)
{ {
LPSERVICE_DESCRIPTIONW lpServiceDescription = (LPSERVICE_DESCRIPTIONW)lpInfo; LPSERVICE_DESCRIPTIONW lpServiceDescription;
if (dwInfoSize != sizeof(*lpServiceDescription)) lpServiceDescription = (LPSERVICE_DESCRIPTIONW)lpInfo;
{ lpServiceDescription->lpDescription = (LPWSTR)(lpInfo + sizeof(LPSERVICE_DESCRIPTIONW));
dwError = ERROR_INVALID_PARAMETER;
goto done;
}
if (lpServiceDescription != NULL && lpServiceDescription->lpDescription != NULL) if (lpServiceDescription != NULL &&
lpServiceDescription->lpDescription != NULL)
{ {
RegSetValueExW(hServiceKey, RegSetValueExW(hServiceKey,
L"Description", L"Description",
@ -2327,7 +2325,7 @@ done:
if (hServiceKey != NULL) if (hServiceKey != NULL)
RegCloseKey(hServiceKey); RegCloseKey(hServiceKey);
DPRINT("ScmrChangeServiceConfigW() done (Error %lu)\n", dwError); DPRINT("ScmrChangeServiceConfig2W() done (Error %lu)\n", dwError);
return dwError; return dwError;
} }