[AFD]
authorCameron Gutman <aicommander@gmail.com>
Sun, 25 Apr 2010 20:51:07 +0000 (20:51 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sun, 25 Apr 2010 20:51:07 +0000 (20:51 +0000)
- Add some sanity checks

svn path=/trunk/; revision=47023

reactos/drivers/network/afd/afd/lock.c

index 7605f8d..dcc4f24 100644 (file)
 PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) {
     BOOLEAN LockFailed = FALSE;
 
 PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) {
     BOOLEAN LockFailed = FALSE;
 
+    ASSERT(IrpSp->Parameters.DeviceIoControl.Type3InputBuffer);
+    ASSERT(IrpSp->Parameters.DeviceIoControl.InputBufferLength);
+    ASSERT(!Irp->MdlAddress);
+
     Irp->MdlAddress =
        IoAllocateMdl( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer,
                       IrpSp->Parameters.DeviceIoControl.InputBufferLength,
     Irp->MdlAddress =
        IoAllocateMdl( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer,
                       IrpSp->Parameters.DeviceIoControl.InputBufferLength,