Author: akhaldi Date: Mon Aug 1 08:45:49 2016 New Revision: 72068
URL: http://svn.reactos.org/svn/reactos?rev=72068&view=rev Log: [0.4.2] * Merge the ntfs fix by Trevor in r72067. CORE-11707
Modified: branches/ros-branch-0_4_2/reactos/ (props changed) branches/ros-branch-0_4_2/reactos/drivers/filesystems/ntfs/rw.c
Propchange: branches/ros-branch-0_4_2/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 1 08:45:49 2016 @@ -20,4 +20,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:72020-72022,72026,72028,72030,72032-72034,72036,72063 +/trunk/reactos:72020-72022,72026,72028,72030,72032-72034,72036,72063,72067
Modified: branches/ros-branch-0_4_2/reactos/drivers/filesystems/ntfs/rw.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_2/reactos/drivers... ============================================================================== --- branches/ros-branch-0_4_2/reactos/drivers/filesystems/ntfs/rw.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_2/reactos/drivers/filesystems/ntfs/rw.c [iso-8859-1] Mon Aug 1 08:45:49 2016 @@ -147,7 +147,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);