Author: ekohl
Date: Fri May 1 12:15:49 2015
New Revision: 67492
URL:
http://svn.reactos.org/svn/reactos?rev=67492&view=rev
Log:
[FASTFAT]
VfatRead: Check the Length before checking the ByteOffset because reading 0 bytes should
always be successful.
Modified:
trunk/reactos/drivers/filesystems/fastfat/rw.c
Modified: trunk/reactos/drivers/filesystems/fastfat/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Fri May 1 12:15:49 2015
@@ -599,6 +599,13 @@
goto ByeBye;
}
+ if (Length == 0)
+ {
+ IrpContext->Irp->IoStatus.Information = 0;
+ Status = STATUS_SUCCESS;
+ goto ByeBye;
+ }
+
if (ByteOffset.QuadPart >= Fcb->RFCB.FileSize.QuadPart)
{
IrpContext->Irp->IoStatus.Information = 0;
@@ -615,13 +622,6 @@
Status = STATUS_INVALID_PARAMETER;
goto ByeBye;
}
- }
-
- if (Length == 0)
- {
- IrpContext->Irp->IoStatus.Information = 0;
- Status = STATUS_SUCCESS;
- goto ByeBye;
}
if (Fcb->Flags & FCB_IS_VOLUME)