mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user