https://git.reactos.org/?p=reactos.git;a=commitdiff;h=024daea0af58e61138b60…
commit 024daea0af58e61138b60e4b73ba004a3ae58378
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Mon May 29 09:54:31 2023 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Mon May 29 09:54:31 2023 +0200
[UMPNPMGR] Check ulFlags in PNP_GetGlobalState
Return CR_INVALID_FLAG if ulFlags is not zero.
---
base/services/umpnpmgr/rpcserver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c
index 304b291dc5e..5625b4c3262 100644
--- a/base/services/umpnpmgr/rpcserver.c
+++ b/base/services/umpnpmgr/rpcserver.c
@@ -659,11 +659,13 @@ PNP_GetGlobalState(
DWORD ulFlags)
{
UNREFERENCED_PARAMETER(hBinding);
- UNREFERENCED_PARAMETER(ulFlags);
DPRINT("PNP_GetGlobalState(%p %p 0x%08lx)\n",
hBinding, pulState, ulFlags);
+ if (ulFlags != 0)
+ return CR_INVALID_FLAG;
+
*pulState = CM_GLOBAL_STATE_CAN_DO_UI | CM_GLOBAL_STATE_SERVICES_AVAILABLE;
return CR_SUCCESS;