https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d6e577ced93fb03fa171f…
commit d6e577ced93fb03fa171fb10f6d22ac7802a7587
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Sep 9 20:52:36 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Sep 9 23:23:55 2018 +0200
[SERVICES] RChangeServiceConfigW: Check valid usage of lpdwTagId when lpLoadOrderGroup
is not specified.
---
base/system/services/rpcserver.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/base/system/services/rpcserver.c b/base/system/services/rpcserver.c
index 351793736d..3c5af07499 100644
--- a/base/system/services/rpcserver.c
+++ b/base/system/services/rpcserver.c
@@ -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)
{