Author: tfaber
Date: Sun Oct 30 20:32:02 2016
New Revision: 73086
URL:
http://svn.reactos.org/svn/reactos?rev=73086&view=rev
Log:
[0.4.3]
- Merge the fastfat fix for Chrome committed in r73072
CORE-12132
Modified:
branches/ros-branch-0_4_3/ (props changed)
branches/ros-branch-0_4_3/reactos/ (props changed)
branches/ros-branch-0_4_3/reactos/drivers/filesystems/fastfat/rw.c
Propchange: branches/ros-branch-0_4_3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 30 20:32:02 2016
@@ -1 +1 @@
-/trunk:73043,73075,73077
+/trunk:73043,73072,73075,73077
Propchange: branches/ros-branch-0_4_3/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 30 20:32:02 2016
@@ -21,4 +21,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:73043,73075,73077
+/trunk/reactos:73043,73072,73075,73077
Modified: branches/ros-branch-0_4_3/reactos/drivers/filesystems/fastfat/rw.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_3/reactos/driver…
==============================================================================
--- branches/ros-branch-0_4_3/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_4_3/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Sun
Oct 30 20:32:02 2016
@@ -656,11 +656,6 @@
}
Buffer = VfatGetUserBuffer(IrpContext->Irp,
BooleanFlagOn(IrpContext->Irp->Flags, IRP_PAGING_IO));
- Status = VfatLockUserBuffer(IrpContext->Irp, Length, IoWriteAccess);
- if (!NT_SUCCESS(Status))
- {
- goto ByeBye;
- }
if (!(IrpContext->Irp->Flags & (IRP_NOCACHE|IRP_PAGING_IO)) &&
!(Fcb->Flags & (FCB_IS_PAGE_FILE|FCB_IS_VOLUME)))
@@ -711,6 +706,12 @@
else
{
// non cached read
+ Status = VfatLockUserBuffer(IrpContext->Irp, Length, IoWriteAccess);
+ if (!NT_SUCCESS(Status))
+ {
+ goto ByeBye;
+ }
+
if (ByteOffset.QuadPart + Length > ROUND_UP_64(Fcb->RFCB.FileSize.QuadPart,
BytesPerSector))
{
Length = (ULONG)(ROUND_UP_64(Fcb->RFCB.FileSize.QuadPart, BytesPerSector)
- ByteOffset.QuadPart);
@@ -921,12 +922,6 @@
}
Buffer = VfatGetUserBuffer(IrpContext->Irp,
BooleanFlagOn(IrpContext->Irp->Flags, IRP_PAGING_IO));
- Status = VfatLockUserBuffer(IrpContext->Irp, Length, IoReadAccess);
- if (!NT_SUCCESS(Status))
- {
- Status = STATUS_INVALID_USER_BUFFER;
- goto ByeBye;
- }
if (!(Fcb->Flags & (FCB_IS_FAT|FCB_IS_VOLUME)) &&
!(IrpContext->Irp->Flags & IRP_PAGING_IO) &&
@@ -987,6 +982,12 @@
else
{
// non cached write
+ Status = VfatLockUserBuffer(IrpContext->Irp, Length, IoReadAccess);
+ if (!NT_SUCCESS(Status))
+ {
+ Status = STATUS_INVALID_USER_BUFFER;
+ goto ByeBye;
+ }
if (ByteOffset.QuadPart > OldFileSize.QuadPart)
{