Author: tthompson
Date: Sun Jun 12 04:02:52 2016
New Revision: 71616

URL: http://svn.reactos.org/svn/reactos?rev=71616&view=rev
Log:
[NTFS]
Add fixes to WriteAttribute():
-Remove erroneous check for end of run (before writing to the last run returned)
-Properly dereference RealLengthWritten pointer, as reported in CR-90

Modified:
    branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c

Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
URL: 
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c?rev=71616&r1=71615&r2=71616&view=diff
==============================================================================
--- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c      [iso-8859-1] 
(original)
+++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c      [iso-8859-1] 
Sun Jun 12 04:02:52 2016
@@ -520,17 +520,6 @@
         }
         else
             DataRunStartLCN = -1;
-
-        if (*DataRun == 0)
-        {
-            if (Length == 0)
-                return STATUS_SUCCESS;
-
-            // This code shouldn't execute, because we should have extended 
the allocation size
-            // or failed the request by now. It's just a sanity check.
-            DPRINT1("Encountered EOF before expected!\n");
-            return STATUS_END_OF_FILE;
-        }
     }
 
     // Do we have more data to write?
@@ -559,7 +548,7 @@
 
         Length -= WriteLength;
         SourceBuffer += WriteLength;
-        RealLengthWritten += WriteLength;
+        *RealLengthWritten += WriteLength;
 
         // We finished this request, but there's still data in this data run. 
         if (Length == 0 && WriteLength != DataRunLength * 
Vcb->NtfsInfo.BytesPerCluster)


Reply via email to