mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[FASTFAT]
In IRP_MJ_QUERY_INFORMATION/IRP_MJ_SET_INFORMATION, handle the case when we receive buggy FO without FCB. This fixes bugchecks when using FileSpy. CORE-12448 svn path=/trunk/; revision=73362
This commit is contained in:
parent
07d9832b5f
commit
c3b22d159c
1 changed files with 13 additions and 0 deletions
|
@ -1444,6 +1444,12 @@ VfatQueryInformation(
|
|||
DPRINT("VfatQueryInformation is called for '%s'\n",
|
||||
FileInformationClass >= FileMaximumInformation - 1 ? "????" : FileInformationClassNames[FileInformationClass]);
|
||||
|
||||
if (FCB == NULL)
|
||||
{
|
||||
DPRINT1("IRP_MJ_QUERY_INFORMATION without FCB!\n");
|
||||
IrpContext->Irp->IoStatus.Information = 0;
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
|
||||
BufferLength = IrpContext->Stack->Parameters.QueryFile.Length;
|
||||
|
@ -1569,6 +1575,13 @@ VfatSetInformation(
|
|||
DPRINT("FileInformationClass %d\n", FileInformationClass);
|
||||
DPRINT("SystemBuffer %p\n", SystemBuffer);
|
||||
|
||||
if (FCB == NULL)
|
||||
{
|
||||
DPRINT1("IRP_MJ_SET_INFORMATION without FCB!\n");
|
||||
IrpContext->Irp->IoStatus.Information = 0;
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
/* Special: We should call MmCanFileBeTruncated here to determine if changing
|
||||
the file size would be allowed. If not, we bail with the right error.
|
||||
We must do this before acquiring the lock. */
|
||||
|
|
Loading…
Reference in a new issue