Input parameter in FSCTL_GET_RETRIEVAL_POINTERS is really a STARTING_VCN_INPUT_BUFFER structure (even if it contains only a LARGE_INTEGER)

svn path=/trunk/; revision=17319
This commit is contained in:
Hervé Poussineau 2005-08-11 21:29:37 +00:00
parent 733f1ba80d
commit 0c6db72406

View file

@ -704,7 +704,7 @@ VfatGetRetrievalPointers(PVFAT_IRP_CONTEXT IrpContext)
DeviceExt = IrpContext->DeviceExt;
FileObject = IrpContext->FileObject;
Stack = IrpContext->Stack;
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(LARGE_INTEGER) ||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(STARTING_VCN_INPUT_BUFFER) ||
Stack->Parameters.DeviceIoControl.Type3InputBuffer == NULL)
{
return STATUS_INVALID_PARAMETER;
@ -719,7 +719,7 @@ VfatGetRetrievalPointers(PVFAT_IRP_CONTEXT IrpContext)
ExAcquireResourceSharedLite(&Fcb->MainResource, TRUE);
Vcn = *(PLARGE_INTEGER)Stack->Parameters.DeviceIoControl.Type3InputBuffer;
Vcn = ((PSTARTING_VCN_INPUT_BUFFER)Stack->Parameters.DeviceIoControl.Type3InputBuffer)->StartingVcn;
RetrievalPointers = IrpContext->Irp->UserBuffer;
MaxExtentCount = ((Stack->Parameters.DeviceIoControl.OutputBufferLength - sizeof(RetrievalPointers->ExtentCount) - sizeof(RetrievalPointers->StartingVcn)) / sizeof(RetrievalPointers->Extents[0]));