Author: arty
Date: Mon Nov 12 01:21:37 2007
New Revision: 30368
URL:
http://svn.reactos.org/svn/reactos?rev=30368&view=rev
Log:
Properly handle access violation copying from userland.
Modified:
trunk/reactos/drivers/network/afd/afd/read.c
Modified: trunk/reactos/drivers/network/afd/afd/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/read.c (original)
+++ trunk/reactos/drivers/network/afd/afd/read.c Mon Nov 12 01:21:37 2007
@@ -559,6 +559,11 @@
RecvReq->AddressLength,
TRUE, TRUE );
+ if( !RecvReq->BufferArray ) { /* access violation in userspace */
+ return UnlockAndMaybeComplete
+ ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0, NULL, FALSE );
+ }
+
if( !IsListEmpty( &FCB->DatagramList ) ) {
ListEntry = RemoveHeadList( &FCB->DatagramList );
DatagramRecv = CONTAINING_RECORD