Index: drivers/filesystems/ntfs/rw.c =================================================================== --- drivers/filesystems/ntfs/rw.c (revision 72061) +++ drivers/filesystems/ntfs/rw.c (working copy) @@ -148,7 +148,10 @@ RealLength = ROUND_UP(ToRead, DeviceExt->NtfsInfo.BytesPerSector); /* do we need to extend RealLength by one sector? */ if (RealLength + RealReadOffset < ReadOffset + Length) - RealLength += DeviceExt->NtfsInfo.BytesPerSector; + { + if (RealReadOffset + RealLength + DeviceExt->NtfsInfo.BytesPerSector <= AttributeAllocatedLength(&DataContext->Record)) + RealLength += DeviceExt->NtfsInfo.BytesPerSector; + } ReadBuffer = ExAllocatePoolWithTag(NonPagedPool, RealLength, TAG_NTFS);