mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[NTFS]
Don't attempt to read a sparse run of the disk. Patch by Trevor Thompson CORE-10998 svn path=/trunk/; revision=71159
This commit is contained in:
parent
db73e15d85
commit
82c9e05743
1 changed files with 12 additions and 6 deletions
|
@ -243,13 +243,19 @@ ReadAttribute(PDEVICE_EXTENSION Vcb,
|
|||
|
||||
ReadLength = (ULONG)min(DataRunLength * Vcb->NtfsInfo.BytesPerCluster - (Offset - CurrentOffset), Length);
|
||||
if (DataRunStartLCN == -1)
|
||||
{
|
||||
RtlZeroMemory(Buffer, ReadLength);
|
||||
Status = NtfsReadDisk(Vcb->StorageDevice,
|
||||
DataRunStartLCN * Vcb->NtfsInfo.BytesPerCluster + Offset - CurrentOffset,
|
||||
ReadLength,
|
||||
Vcb->NtfsInfo.BytesPerSector,
|
||||
(PVOID)Buffer,
|
||||
FALSE);
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = NtfsReadDisk(Vcb->StorageDevice,
|
||||
DataRunStartLCN * Vcb->NtfsInfo.BytesPerCluster + Offset - CurrentOffset,
|
||||
ReadLength,
|
||||
Vcb->NtfsInfo.BytesPerSector,
|
||||
(PVOID)Buffer,
|
||||
FALSE);
|
||||
}
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Length -= ReadLength;
|
||||
|
|
Loading…
Reference in a new issue