https://git.reactos.org/?p=reactos.git;a=commitdiff;h=830e15b622515b3f70e7c…
commit 830e15b622515b3f70e7cafc07d15173fa3df1b1
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Mon Jun 21 21:33:24 2021 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Mon Jun 21 21:33:24 2021 +0200
[UMPNPMGR] Add missing parameter checks to PNP_GetDeviceStatus
---
base/services/umpnpmgr/rpcserver.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c
index d84e0cab4ff..bb63bce02bd 100644
--- a/base/services/umpnpmgr/rpcserver.c
+++ b/base/services/umpnpmgr/rpcserver.c
@@ -22,7 +22,7 @@
* FILE: base/services/umpnpmgr/rpcserver.c
* PURPOSE: RPC server
* PROGRAMMER: Eric Kohl (eric.kohl(a)reactos.org)
- * Herv� Poussineau (hpoussin(a)reactos.org)
+ * Hervé Poussineau (hpoussin(a)reactos.org)
* Colin Finck (colin(a)reactos.org)
*/
@@ -3199,6 +3199,12 @@ PNP_GetDeviceStatus(
DPRINT("PNP_GetDeviceStatus(%p %S %p %p 0x%08lx)\n",
hBinding, pDeviceID, pulStatus, pulProblem, ulFlags);
+ if (ulFlags != 0)
+ return CR_INVALID_FLAG;
+
+ if ((pulStatus == NULL) || (pulProblem == NULL))
+ return CR_INVALID_POINTER;
+
if (!IsValidDeviceInstanceID(pDeviceID))
return CR_INVALID_DEVINST;