mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 18:43:37 +00:00
[NTFS]
Cowardly refuse to continue processing (enumerating/reading) when stumbling upon a compressed entry. This avoids infinite loops when enumerating, incorrect files contents when reading. CORE-10814 #resolve #comment 'Fixed' with r70750 svn path=/trunk/; revision=70750
This commit is contained in:
parent
5bb8c16219
commit
dcef60424d
4 changed files with 23 additions and 0 deletions
|
@ -298,6 +298,13 @@ NtfsQueryDirectory(PNTFS_IRP_CONTEXT IrpContext)
|
|||
FileInformationClass = Stack->Parameters.QueryDirectory.FileInformationClass;
|
||||
FileIndex = Stack->Parameters.QueryDirectory.FileIndex;
|
||||
|
||||
if (NtfsFCBIsCompressed(Fcb))
|
||||
{
|
||||
DPRINT1("Compressed directory!\n");
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
if (SearchPattern != NULL)
|
||||
{
|
||||
if (!Ccb->DirectorySearchPattern)
|
||||
|
|
|
@ -137,6 +137,12 @@ NtfsFCBIsReparsePoint(PNTFS_FCB Fcb)
|
|||
}
|
||||
|
||||
|
||||
BOOLEAN
|
||||
NtfsFCBIsCompressed(PNTFS_FCB Fcb)
|
||||
{
|
||||
return ((Fcb->Entry.FileAttributes & NTFS_FILE_TYPE_COMPRESSED) == NTFS_FILE_TYPE_COMPRESSED);
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NtfsFCBIsRoot(PNTFS_FCB Fcb)
|
||||
{
|
||||
|
|
|
@ -642,6 +642,9 @@ NtfsFCBIsDirectory(PNTFS_FCB Fcb);
|
|||
BOOLEAN
|
||||
NtfsFCBIsReparsePoint(PNTFS_FCB Fcb);
|
||||
|
||||
BOOLEAN
|
||||
NtfsFCBIsCompressed(PNTFS_FCB Fcb);
|
||||
|
||||
BOOLEAN
|
||||
NtfsFCBIsRoot(PNTFS_FCB Fcb);
|
||||
|
||||
|
|
|
@ -71,6 +71,13 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
|
|||
|
||||
Fcb = (PNTFS_FCB)FileObject->FsContext;
|
||||
|
||||
if (NtfsFCBIsCompressed(Fcb))
|
||||
{
|
||||
DPRINT1("Compressed file!\n");
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
FileRecord = ExAllocatePoolWithTag(NonPagedPool, DeviceExt->NtfsInfo.BytesPerFileRecord, TAG_NTFS);
|
||||
if (FileRecord == NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue