From ee3254e46f5aa01b2f62593c8d8bfca21574b508 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 5 Jul 2019 08:49:07 +0000 Subject: [PATCH] Return with proper error status for bad address Signed-off-by: Jason A. Donenfeld --- wintun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wintun.c b/wintun.c index f12e58e..62c1417 100644 --- a/wintun.c +++ b/wintun.c @@ -807,7 +807,7 @@ TunDispatchWrite(_Inout_ TUN_CTX *Ctx, _Inout_ IRP *Irp) LONG *MdlRefcount = (LONG *)BufferStart; try { - Status = STATUS_INSUFFICIENT_RESOURCES; + Status = STATUS_INVALID_USER_BUFFER; ProbeForRead(Irp->UserBuffer, Size, 1); NdisMoveMemory(BufferStart, Irp->UserBuffer, Size); }