ntfs-3g/include
Jean-Pierre André f86c4403ed Corrected validation of multi sector transfer protected records
The validation contained an off-by-one error.  The
expression '(u32)(usa_ofs + (usa_count * 2)) > size' used 'usa_count'
after it had been decremented to skip the update sequence number entry.
Consequently, the code could read out of bounds, up to two bytes past the
end of the MST-protected record.

Furthermore, as documented in the comment in layout.h for "NTFS_RECORD"
and also on MSDN for "MULTI_SECTOR_HEADER", the update sequence array
must end before the last le16 in the first logical sector --- not merely
before the end of the record.

Fix the validation and move it into a helper function, as it was done
identically in the read and write paths.

Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
2016-07-28 16:26:21 +02:00
..
fuse-lite Set the fuse protocol fall back to 7.12 when available 2014-11-10 08:52:23 +01:00
ntfs-3g Corrected validation of multi sector transfer protected records 2016-07-28 16:26:21 +02:00
Makefile.am Moved list.h into ntfsprogs and got rid of include/ntfs completely. 2010-12-16 17:34:47 +01:00