[NTFS]
authorTrevor Thompson <tmt256@email.vccs.edu>
Wed, 6 Jul 2016 07:57:57 +0000 (07:57 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 10 Dec 2017 10:13:50 +0000 (11:13 +0100)
Fix copy-paste error in SetAttributeDataLength()

svn path=/branches/GSoC_2016/NTFS/; revision=71832

drivers/filesystems/ntfs/mft.c

index 4e10584..a5111c1 100644 (file)
@@ -228,9 +228,9 @@ SetAttributeDataLength(PFILE_OBJECT FileObject,
     NTSTATUS Status = STATUS_SUCCESS;
 
     // are we truncating the file?
-    if (DataSize->QuadPart < AttributeDataLength(&AttrContext->Record)
+    if (DataSize->QuadPart < AttributeDataLength(&AttrContext->Record))
     {
-        if (!MmCanFileBeTruncated(FileObject->SectionObjectPointer, (PLARGE_INTEGER)&AllocationSize))
+        if (!MmCanFileBeTruncated(FileObject->SectionObjectPointer, DataSize))
         {
             DPRINT1("Can't truncate a memory-mapped file!\n");
             return STATUS_USER_MAPPED_FILE;