https://git.reactos.org/?p=reactos.git;a=commitdiff;h=830e15b622515b3f70e7cafc07d15173fa3df1b1

commit 830e15b622515b3f70e7cafc07d15173fa3df1b1
Author:     Eric Kohl <[email protected]>
AuthorDate: Mon Jun 21 21:33:24 2021 +0200
Commit:     Eric Kohl <[email protected]>
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 ([email protected])
- *                   Herv� Poussineau ([email protected])
+ *                   Hervé Poussineau ([email protected])
  *                   Colin Finck ([email protected])
  */
 
@@ -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;
 

Reply via email to