mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 09:51:56 +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;
|
FileInformationClass = Stack->Parameters.QueryDirectory.FileInformationClass;
|
||||||
FileIndex = Stack->Parameters.QueryDirectory.FileIndex;
|
FileIndex = Stack->Parameters.QueryDirectory.FileIndex;
|
||||||
|
|
||||||
|
if (NtfsFCBIsCompressed(Fcb))
|
||||||
|
{
|
||||||
|
DPRINT1("Compressed directory!\n");
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
if (SearchPattern != NULL)
|
if (SearchPattern != NULL)
|
||||||
{
|
{
|
||||||
if (!Ccb->DirectorySearchPattern)
|
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
|
BOOLEAN
|
||||||
NtfsFCBIsRoot(PNTFS_FCB Fcb)
|
NtfsFCBIsRoot(PNTFS_FCB Fcb)
|
||||||
{
|
{
|
||||||
|
|
|
@ -642,6 +642,9 @@ NtfsFCBIsDirectory(PNTFS_FCB Fcb);
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NtfsFCBIsReparsePoint(PNTFS_FCB Fcb);
|
NtfsFCBIsReparsePoint(PNTFS_FCB Fcb);
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
NtfsFCBIsCompressed(PNTFS_FCB Fcb);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NtfsFCBIsRoot(PNTFS_FCB Fcb);
|
NtfsFCBIsRoot(PNTFS_FCB Fcb);
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,13 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
|
||||||
|
|
||||||
Fcb = (PNTFS_FCB)FileObject->FsContext;
|
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);
|
FileRecord = ExAllocatePoolWithTag(NonPagedPool, DeviceExt->NtfsInfo.BytesPerFileRecord, TAG_NTFS);
|
||||||
if (FileRecord == NULL)
|
if (FileRecord == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue