services: Always initialise the out buffer in svcctl_QueryServiceStatusEx and svcctl_QueryServiceConfig2W.

This commit is contained in:
Rob Shearman 2009-03-24 11:26:35 +00:00 committed by Alexandre Julliard
parent 1c89dacf9c
commit 286dc62e34
1 changed files with 4 additions and 0 deletions

View File

@ -654,6 +654,8 @@ DWORD svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
struct sc_service_handle *service; struct sc_service_handle *service;
DWORD err; DWORD err;
memset(buffer, 0, size);
if ((err = validate_service_handle(hService, SERVICE_QUERY_STATUS, &service)) != 0) if ((err = validate_service_handle(hService, SERVICE_QUERY_STATUS, &service)) != 0)
return err; return err;
@ -701,6 +703,8 @@ DWORD svcctl_QueryServiceStatusEx(
DWORD err; DWORD err;
LPSERVICE_STATUS_PROCESS pSvcStatusData; LPSERVICE_STATUS_PROCESS pSvcStatusData;
memset(lpBuffer, 0, cbBufSize);
if ((err = validate_service_handle(hService, SERVICE_QUERY_STATUS, &service)) != 0) if ((err = validate_service_handle(hService, SERVICE_QUERY_STATUS, &service)) != 0)
return err; return err;