[SERVICES] RChangeServiceConfigW: Check valid usage of lpdwTagId when lpLoadOrderGrou...
[reactos.git] / base / system / services / rpcserver.c
index 3517937..3c5af07 100644 (file)
@@ -1989,6 +1989,11 @@ RChangeServiceConfigW(
         (dwErrorControl != SERVICE_ERROR_CRITICAL))
         return ERROR_INVALID_PARAMETER;
 
+    if (lpdwTagId && (!lpLoadOrderGroup || !*lpLoadOrderGroup))
+    {
+        return ERROR_INVALID_PARAMETER;
+    }
+
     lpService = hSvc->ServiceEntry;
     if (lpService == NULL)
     {