Author: pschweitzer
Date: Sun Apr 27 11:14:16 2014
New Revision: 63014
URL:
http://svn.reactos.org/svn/reactos?rev=63014&view=rev
Log:
[NTOSKRNL]
Few fixes to IopGetBasicInformationFile() and NtSetInformationFile().
Spotted by Thomas
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Sun Apr 27 11:14:16 2014
@@ -710,7 +710,7 @@
if (DeviceObject->DriverObject->FastIoDispatch != NULL &&
DeviceObject->DriverObject->FastIoDispatch->FastIoQueryBasicInfo != NULL
&&
DeviceObject->DriverObject->FastIoDispatch->FastIoQueryBasicInfo(FileObject,
-
(FileObject->Flags & FO_SYNCHRONOUS_IO),
+
((FileObject->Flags & FO_SYNCHRONOUS_IO) != 0),
BasicInfo,
&IoStatusBlock,
DeviceObject))
@@ -2446,7 +2446,7 @@
PFILE_COMPLETION_INFORMATION CompletionInfo = FileInformation;
PIO_COMPLETION_CONTEXT Context;
PFILE_RENAME_INFORMATION RenameInfo;
- HANDLE TargetHandle = INVALID_HANDLE_VALUE;
+ HANDLE TargetHandle = NULL;
PAGED_CODE();
IOTRACE(IO_API_DEBUG, "FileHandle: %p\n", FileHandle);
@@ -2744,6 +2744,11 @@
Status = IoCallDriver(DeviceObject, Irp);
}
}
+ else
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ Irp->IoStatus.Status = Status;
+ }
}
else
{
@@ -2836,7 +2841,7 @@
if (!LocalEvent) IopUnlockFileObject(FileObject);
}
- if (TargetHandle != INVALID_HANDLE_VALUE)
+ if (TargetHandle != NULL)
{
ObCloseHandle(TargetHandle, KernelMode);
}