[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Wed, 13 Apr 2016 20:06:56 +0000 (20:06 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 13 Apr 2016 20:06:56 +0000 (20:06 +0000)
Don't perform an overestimated allocation in NtfsReadFile()

Patch by Trevor Thompson

CORE-10998

svn path=/trunk/; revision=71156

reactos/drivers/filesystems/ntfs/rw.c

index e74d5a6..be5ec28 100644 (file)
@@ -150,7 +150,7 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
             RealLength += DeviceExt->NtfsInfo.BytesPerSector;
 
 
-        ReadBuffer = ExAllocatePoolWithTag(NonPagedPool, RealLength + (DeviceExt->NtfsInfo.BytesPerSector * 2), TAG_NTFS);
+        ReadBuffer = ExAllocatePoolWithTag(NonPagedPool, RealLength, TAG_NTFS);
         if (ReadBuffer == NULL)
         {
             DPRINT1("Not enough memory!\n");