mirror of
https://github.com/reactos/reactos.git
synced 2025-04-29 18:48:53 +00:00
[SERVICES]
REnumServicesStatusExW: Fix dwServiceType and dwServiceState checks. svn path=/trunk/; revision=54373
This commit is contained in:
parent
6735cfc56e
commit
77d6d4815b
1 changed files with 5 additions and 2 deletions
|
@ -5304,13 +5304,16 @@ DWORD REnumServicesStatusExW(
|
|||
*pcbBytesNeeded = 0;
|
||||
*lpServicesReturned = 0;
|
||||
|
||||
if ((dwServiceType!=SERVICE_DRIVER) && (dwServiceType!=SERVICE_WIN32))
|
||||
if ((dwServiceType == 0) ||
|
||||
((dwServiceType & ~(SERVICE_DRIVER | SERVICE_WIN32)) != 0))
|
||||
{
|
||||
DPRINT("Not a valid Service Type!\n");
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if ((dwServiceState<SERVICE_ACTIVE) || (dwServiceState>SERVICE_STATE_ALL))
|
||||
if ((dwServiceState != SERVICE_ACTIVE) &&
|
||||
(dwServiceState != SERVICE_INACTIVE) &&
|
||||
(dwServiceState != SERVICE_STATE_ALL))
|
||||
{
|
||||
DPRINT("Not a valid Service State!\n");
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
|
Loading…
Reference in a new issue