[NTFS] - Fix some more issues, including remaining issues marked as "unresolved" from CR-123:

-Add define for indexed flag for resident attributes, RA_INDEXED.
-CreateBTreeFromIndex() - Don't try to read index entries beyond attribute length.
-Move NtfsAddFileNameToDirectory() from dirctl.c to mft.c (no changes to function).
-SetResidentAttributeDataLength() - Don't try to free AttribData if it hasn't been allocated. Cast IndexRecord to PUCHAR for WriteAttribute(), and cast BitmapData to PCHAR for ReadAttribute() (make gcc happy).
-Replace magic number 16 with a define, NTFS_FILE_FIRST_USER_FILE.

svn path=/branches/GSoC_2016/NTFS/; revision=75371
This commit is contained in:
Trevor Thompson 2017-07-18 19:59:36 +00:00 committed by Thomas Faber
parent 430ce0a9e3
commit 935fcd1b35
6 changed files with 284 additions and 271 deletions

View file

@ -245,7 +245,7 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
AttributeAddress->Resident.ValueLength = FIELD_OFFSET(FILENAME_ATTRIBUTE, Name) + FilenameNoPath.Length;
AttributeAddress->Resident.ValueOffset = ResidentHeaderLength;
AttributeAddress->Resident.Flags = 1; // indexed
AttributeAddress->Resident.Flags = RA_INDEXED;
// move the attribute-end and file-record-end markers to the end of the file record
AttributeAddress = (PNTFS_ATTR_RECORD)((ULONG_PTR)AttributeAddress + AttributeAddress->Length);