Return with proper error status for bad address
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
ef12ddb2be
commit
ee3254e46f
2
wintun.c
2
wintun.c
@ -807,7 +807,7 @@ TunDispatchWrite(_Inout_ TUN_CTX *Ctx, _Inout_ IRP *Irp)
|
|||||||
LONG *MdlRefcount = (LONG *)BufferStart;
|
LONG *MdlRefcount = (LONG *)BufferStart;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
Status = STATUS_INVALID_USER_BUFFER;
|
||||||
ProbeForRead(Irp->UserBuffer, Size, 1);
|
ProbeForRead(Irp->UserBuffer, Size, 1);
|
||||||
NdisMoveMemory(BufferStart, Irp->UserBuffer, Size);
|
NdisMoveMemory(BufferStart, Irp->UserBuffer, Size);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user