mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[FASTFAT]
- Assert that clusters supposedly belonging to a file are not in fact marked as free CORE-9433 svn path=/trunk/; revision=66932
This commit is contained in:
parent
7f5f21a52f
commit
abf3e9f6bf
1 changed files with 6 additions and 0 deletions
|
@ -49,6 +49,7 @@ FAT32GetNextCluster(
|
|||
if (CurrentCluster >= 0xffffff8 && CurrentCluster <= 0xfffffff)
|
||||
CurrentCluster = 0xffffffff;
|
||||
|
||||
ASSERT(CurrentCluster != 0);
|
||||
CcUnpinData(Context);
|
||||
*NextCluster = CurrentCluster;
|
||||
return STATUS_SUCCESS;
|
||||
|
@ -80,6 +81,7 @@ FAT16GetNextCluster(
|
|||
CurrentCluster = *((PUSHORT)((char*)BaseAddress + (FATOffset % ChunkSize)));
|
||||
if (CurrentCluster >= 0xfff8 && CurrentCluster <= 0xffff)
|
||||
CurrentCluster = 0xffffffff;
|
||||
ASSERT(CurrentCluster != 0);
|
||||
CcUnpinData(Context);
|
||||
*NextCluster = CurrentCluster;
|
||||
return STATUS_SUCCESS;
|
||||
|
@ -123,6 +125,7 @@ FAT12GetNextCluster(
|
|||
Entry = 0xffffffff;
|
||||
|
||||
// DPRINT("Returning %x\n",Entry);
|
||||
ASSERT(Entry != 0);
|
||||
*NextCluster = Entry;
|
||||
CcUnpinData(Context);
|
||||
// return Entry == 0xffffffff ? STATUS_END_OF_FILE : STATUS_SUCCESS;
|
||||
|
@ -667,7 +670,10 @@ GetNextCluster(
|
|||
DeviceExt, CurrentCluster);
|
||||
|
||||
if (CurrentCluster == 0)
|
||||
{
|
||||
ASSERT(CurrentCluster != 0);
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
ExAcquireResourceSharedLite(&DeviceExt->FatResource, TRUE);
|
||||
Status = DeviceExt->GetNextCluster(DeviceExt, CurrentCluster, NextCluster);
|
||||
|
|
Loading…
Reference in a new issue