[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 26 Mar 2016 13:15:14 +0000 (13:15 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 26 Mar 2016 13:15:14 +0000 (13:15 +0000)
Fix a bug in sparse files reading.

Spotted and fixed by Aman Priyadarshi

svn path=/trunk/; revision=71053

reactos/drivers/filesystems/ntfs/mft.c

index a1a00bd..2ce158b 100644 (file)
@@ -260,7 +260,7 @@ ReadAttribute(PDEVICE_EXTENSION Vcb,
         {
             CurrentOffset += DataRunLength * Vcb->NtfsInfo.BytesPerCluster;
             DataRun = DecodeRun(DataRun, &DataRunOffset, &DataRunLength);
-            if (DataRunLength != (ULONGLONG)-1)
+            if (DataRunOffset != (ULONGLONG)-1)
             {
                 DataRunStartLCN = LastLCN + DataRunOffset;
                 LastLCN = DataRunStartLCN;