From d6e577ced93fb03fa171fb10f6d22ac7802a7587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 9 Sep 2018 20:52:36 +0200 Subject: [PATCH] [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 351793736d6..3c5af07499d 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) {