Return with proper error status for bad address

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-07-05 08:49:07 +00:00
parent ef12ddb2be
commit ee3254e46f

View File

@ -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);
}