[FASTFAT]

Properly check for volume open on lock request

svn path=/trunk/; revision=65309
This commit is contained in:
Pierre Schweitzer 2014-11-07 15:38:31 +00:00
parent 86e82138e7
commit 0ca2bff44e

View file

@ -865,14 +865,16 @@ VfatLockOrUnlockVolume(
{
PFILE_OBJECT FileObject;
PDEVICE_EXTENSION DeviceExt;
PVFATFCB Fcb;
DPRINT("VfatLockOrUnlockVolume(%p, %d)\n", IrpContext, Lock);
DeviceExt = IrpContext->DeviceExt;
FileObject = IrpContext->FileObject;
Fcb = FileObject->FsContext;
/* Only allow locking with the volume open */
if (FileObject->FsContext != DeviceExt->VolumeFcb)
if (!(Fcb->Flags & FCB_IS_VOLUME))
{
return STATUS_ACCESS_DENIED;
}