[UMPNPMGR] Add missing parameter checks to PNP_GetDeviceStatus

This commit is contained in:
Eric Kohl 2021-06-21 21:33:24 +02:00
parent 41de1bd724
commit 830e15b622

View file

@ -22,7 +22,7 @@
* FILE: base/services/umpnpmgr/rpcserver.c
* PURPOSE: RPC server
* PROGRAMMER: Eric Kohl (eric.kohl@reactos.org)
* Hervé Poussineau (hpoussin@reactos.org)
* Hervé Poussineau (hpoussin@reactos.org)
* Colin Finck (colin@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;