[FASTFAT]

VfatRead: Check the Length before checking the ByteOffset because reading 0 bytes should always be successful.

svn path=/trunk/; revision=67492
This commit is contained in:
Eric Kohl 2015-05-01 12:15:49 +00:00
parent e02846b73f
commit e6c08e03e2

View file

@ -599,6 +599,13 @@ VfatRead(
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;
@ -617,13 +624,6 @@ VfatRead(
}
}
if (Length == 0)
{
IrpContext->Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
goto ByeBye;
}
if (Fcb->Flags & FCB_IS_VOLUME)
{
Resource = &IrpContext->DeviceExt->DirResource;