Author: pschweitzer
Date: Thu Apr 14 20:39:55 2016
New Revision: 71159
URL:
http://svn.reactos.org/svn/reactos?rev=71159&view=rev
Log:
[NTFS]
Don't attempt to read a sparse run of the disk.
Patch by Trevor Thompson
CORE-10998
Modified:
trunk/reactos/drivers/filesystems/ntfs/mft.c
Modified: trunk/reactos/drivers/filesystems/ntfs/mft.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] Thu Apr 14 20:39:55 2016
@@ -243,13 +243,19 @@
ReadLength = (ULONG)min(DataRunLength * Vcb->NtfsInfo.BytesPerCluster - (Offset -
CurrentOffset), Length);
if (DataRunStartLCN == -1)
+ {
RtlZeroMemory(Buffer, ReadLength);
- Status = NtfsReadDisk(Vcb->StorageDevice,
- DataRunStartLCN * Vcb->NtfsInfo.BytesPerCluster + Offset -
CurrentOffset,
- ReadLength,
- Vcb->NtfsInfo.BytesPerSector,
- (PVOID)Buffer,
- FALSE);
+ Status = STATUS_SUCCESS;
+ }
+ else
+ {
+ Status = NtfsReadDisk(Vcb->StorageDevice,
+ DataRunStartLCN * Vcb->NtfsInfo.BytesPerCluster + Offset
- CurrentOffset,
+ ReadLength,
+ Vcb->NtfsInfo.BytesPerSector,
+ (PVOID)Buffer,
+ FALSE);
+ }
if (NT_SUCCESS(Status))
{
Length -= ReadLength;