mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fixed backwards access check that was causing NtWriteFile to fail when given a read only buffer
svn path=/trunk/; revision=15194
This commit is contained in:
parent
6ed3a8cd3f
commit
dfcf0aade2
1 changed files with 3 additions and 3 deletions
|
@ -472,14 +472,14 @@ IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
|
||||||
/* Use an MDL for Direct I/O */
|
/* Use an MDL for Direct I/O */
|
||||||
Irp->MdlAddress = MmCreateMdl(NULL, Buffer, Length);
|
Irp->MdlAddress = MmCreateMdl(NULL, Buffer, Length);
|
||||||
|
|
||||||
/* Use the right Access Type */
|
|
||||||
if (MajorFunction == IRP_MJ_READ)
|
if (MajorFunction == IRP_MJ_READ)
|
||||||
{
|
{
|
||||||
AccessType = IoReadAccess;
|
AccessType = IoWriteAccess;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AccessType = IoWriteAccess;
|
AccessType = IoReadAccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Probe and Lock */
|
/* Probe and Lock */
|
||||||
|
|
Loading…
Reference in a new issue