[ros-dev] [ros-diffs] [pschweitzer] 65166: [NTFS] Simplify buffer size management in GetNtfsFileRecord(). As tests shown, Windows doesn't care about the real size of the file record and expects the caller to pass the co...
Pierre Schweitzer
pierre at reactos.org
Sat Nov 1 10:14:56 UTC 2014
You're missing line 611 where we check against size:
Stack->Parameters.FileSystemControl.OutputBufferLength <
(FIELD_OFFSET(NTFS_FILE_RECORD_OUTPUT_BUFFER, FileRecordBuffer) +
DeviceExt->NtfsInfo.BytesPerFileRecord)
On 01/11/2014 11:13, Thomas Faber wrote:
> On 2014-11-01 11:02, pschweitzer at svn.reactos.org wrote:
>> - OutputBuffer->FileRecordLength = FileRecord->BytesInUse;
>> - RtlCopyMemory(OutputBuffer->FileRecordBuffer, FileRecord, FileRecord->BytesInUse);
>> + OutputBuffer->FileRecordLength = DeviceExt->NtfsInfo.BytesPerFileRecord;
>> + RtlCopyMemory(OutputBuffer->FileRecordBuffer, FileRecord, DeviceExt->NtfsInfo.BytesPerFileRecord);
>
> Wait, now there's no check against OutputBufferLength at all? It should
> at least be
> min(DeviceExt->NtfsInfo.BytesPerFileRecord,
> Stack->Parameters.FileSystemControl.OutputBufferLength)
> in the memcpy size. Or am I missing something?
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3968 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20141101/4454ba72/attachment.bin>
More information about the Ros-dev
mailing list