diff options
author | Simon Rozman <simon@rozman.si> | 2021-10-17 13:25:14 +0200 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2021-10-17 13:25:14 +0200 |
commit | c20b8346741437b653a8cd25116e67f4f2cdbc50 (patch) | |
tree | e4acb89b59ccd7eb1d5fa542cf90f249c0ab3d80 | |
parent | driver: allow ring registration from kernel (diff) | |
download | wintun-c20b8346741437b653a8cd25116e67f4f2cdbc50.tar.xz wintun-c20b8346741437b653a8cd25116e67f4f2cdbc50.zip |
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>
-rw-r--r-- | driver/wintun.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/driver/wintun.c b/driver/wintun.c index fe24afa..f3eea05 100644 --- a/driver/wintun.c +++ b/driver/wintun.c @@ -925,6 +925,7 @@ TunDispatchPnp(DEVICE_OBJECT *DeviceObject, IRP *Irp) continue; KeStackAttachProcess(Process, &ApcState); if (!VerifierFlags) +#pragma warning(suppress : 28126) Status = ObReferenceObjectByHandle( HandleTable->Handles[Index].HandleValue, 0, NULL, UserMode, &Object, &HandleInfo); if (NT_SUCCESS(Status)) |