Author: ekohl
Date: Sun Nov 13 12:13:16 2011
New Revision: 54373
URL:
http://svn.reactos.org/svn/reactos?rev=54373&view=rev
Log:
[SERVICES]
REnumServicesStatusExW: Fix dwServiceType and dwServiceState checks.
Modified:
trunk/reactos/base/system/services/rpcserver.c
Modified: trunk/reactos/base/system/services/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Sun Nov 13 12:13:16 2011
@@ -5304,13 +5304,16 @@
*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;