Author: pschweitzer
Date: Sat Jun 21 05:04:14 2008
New Revision: 34039
URL:
http://svn.reactos.org/svn/reactos?rev=34039&view=rev
Log:
Bugfixes:
- Check whether we have a valid VCB before creating FCB
- Initialize FCBs list before using it...
Modified:
trunk/reactos/drivers/filesystems/ntfs/fcb.c
trunk/reactos/drivers/filesystems/ntfs/fsctl.c
Modified: trunk/reactos/drivers/filesystems/ntfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] Sat Jun 21 05:04:14 2008
@@ -72,6 +72,9 @@
{
PNTFS_FCB Fcb;
+ ASSERT(Vcb);
+ ASSERT(Vcb->Identifier.Type == NTFS_TYPE_VCB);
+
Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(NTFS_FCB), TAG_FCB);
RtlZeroMemory(Fcb, sizeof(NTFS_FCB));
Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] Sat Jun 21 05:04:14 2008
@@ -378,6 +378,7 @@
Vcb->StreamFileObject = IoCreateStreamFileObject(NULL,
Vcb->StorageDevice);
+ InitializeListHead(&Vcb->FcbListHead);
Fcb = NtfsCreateFCB(NULL, Vcb);
if (Fcb == NULL)
@@ -426,7 +427,6 @@
ExInitializeResourceLite(&Vcb->DirResource);
KeInitializeSpinLock(&Vcb->FcbListLock);
- InitializeListHead(&Vcb->FcbListHead);
/* Get serial number */
NewDeviceObject->Vpb->SerialNumber = Vcb->NtfsInfo.SerialNumber;