driver: address Code Analysis warning
In this case, we're referencing objects by handle for closing user space handles. Should be UserMode, not Irp->RequestorMode as C28126 suggests. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
c7b20de96c
commit
c20b834674
@ -925,6 +925,7 @@ TunDispatchPnp(DEVICE_OBJECT *DeviceObject, IRP *Irp)
|
|||||||
continue;
|
continue;
|
||||||
KeStackAttachProcess(Process, &ApcState);
|
KeStackAttachProcess(Process, &ApcState);
|
||||||
if (!VerifierFlags)
|
if (!VerifierFlags)
|
||||||
|
#pragma warning(suppress : 28126)
|
||||||
Status = ObReferenceObjectByHandle(
|
Status = ObReferenceObjectByHandle(
|
||||||
HandleTable->Handles[Index].HandleValue, 0, NULL, UserMode, &Object, &HandleInfo);
|
HandleTable->Handles[Index].HandleValue, 0, NULL, UserMode, &Object, &HandleInfo);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
Loading…
Reference in New Issue
Block a user