OSDN Git Service

Fixed expanding $STANDARD_INFORMATION with almost-full MFT record
authorJean-Pierre André <jpandre@users.sourceforge.net>
Sat, 11 Feb 2017 09:58:46 +0000 (10:58 +0100)
committerJean-Pierre André <jpandre@users.sourceforge.net>
Sat, 11 Feb 2017 09:58:46 +0000 (10:58 +0100)
commit7a0cf11e1c4dd162828e36f3a5a3d12d7f20d88c
treefaee76ce8d614090aa5887e8993e4d77455271b4
parent17b56ccfa2334ec905b80b81b151c54a263a6d61
Fixed expanding $STANDARD_INFORMATION with almost-full MFT record

When setting a security descriptor on an NTFS v1.2 format file in an
NTFS v3.0+ volume, NTFS-3G would migrate $STANDARD_INFORMATION to the
new format, which requires extending its size from 48 to 72 bytes.  If
this happened while the file's MFT record was almost full, and none of
the file's attributes could be made non-resident, and the file did not
have an attribute list attribute, then the operation would unexpectedly
fail with ENOENT.  Fix this by adding an attribute list to the file in
this situation.

(contributed by Eric Biggers)
libntfs-3g/attrib.c