Commit Graph

20 Commits

Author SHA1 Message Date
Jean-Pierre André
aeb1d7fb74 Fixed special case of decompressing a runlist
When the unreadable directory has an ATTRIBUTE_LIST attribute and an
INDEX_ALLOCATION attribute occupying split over several extents, the first
of which defines a single cluster, the first INDEX_ALLOCATION extent has
lowest_vcn=0 and highest_vcn=0, and the second one has lowest_vcn=1.

This unusual case, which can be created by the combination of a small
volume and near-full MFT records, triggers some special-case behavior in
ntfs_mapping_pairs_decompress_i(). That behavior is incorrect if the
attribute's first extent only contains a single cluster, since in that case
highest_vcn=0 as well.

This configuration has been tested on Windows and it *is* able to
successfully read the directory.  This supports the hypothesis that the
volume is valid and NTFS-3g has a bug on the read side.

This bug could, in theory, occur with any non-resident attribute, not just
INDEX_ALLOCATION attributes.

(Contributed by Eric Biggers)
2015-11-20 16:17:48 +01:00
Jean-Pierre André
c0955e5d74 cosmetic : fixed improper wordings (hggdh2) 2011-09-28 16:41:12 +02:00
Jean-Pierre André
246019fcd5 fix : Fixed ntfs_rl_extend() returning garbage in error case (Fabian Keil) 2011-08-04 15:49:36 +02:00
Jean-Pierre André
5cd49257b0 Removed unneeded variables as warned by gcc 4.6 2011-07-05 12:17:29 +02:00
Jean-Pierre André
518196ba5e Improved rebuilding a runlist 2010-10-26 08:59:51 +02:00
Jean-Pierre André
a192775e2a developed overwriting compressed files 2010-05-25 10:25:31 +02:00
jpandre
42f7d07997 Avoided a possible null pointer dereference (Fabian Keil) 2010-01-21 08:09:13 +00:00
jpandre
37c3740aff Made a function static to avoid a compiler warning 2009-11-25 14:19:38 +00:00
jpandre
2fbaecd759 Extended transparent compression support to sequential writing to compressed files 2009-04-03 13:33:24 +00:00
jpandre
2a1d75a3da Adapted to ntfs-3g.2009.3.8 2009-03-27 09:10:00 +00:00
jpandre
ddfb2175a9 Improved creating gaps in sparse files 2009-02-13 10:37:53 +00:00
jpandre
8191533495 Fixed computation of runlists 2009-02-12 16:51:52 +00:00
jpandre
2dc7362ba9 Improved computation of runlist for fragmented files O(n) instead of O(n*n) 2009-02-03 17:12:04 +00:00
szaka
a6d8c6b1a6 new: use tabulated logging; add ntfs_log_enter() and ntfs_log_leave()
and convert the most commonly used functions
2008-06-30 00:13:23 +00:00
szaka
1098244bbf copyright update 2008-06-29 23:13:32 +00:00
szaka
66eec0839d ntfs_runlists_merge: log all errors 2007-07-16 20:47:48 +00:00
szaka
c8176a77a2 ntfs_rl_sparse, ntfs_rl_get_compressed_size: log errors 2007-07-11 22:46:05 +00:00
szaka
75c60e5486 fix 64-bit warnings (Yuval) 2007-01-09 21:22:58 +00:00
szaka
be2dbbf92d ntfs_rl_pwrite: don't check buffer for sparse runs 2006-12-17 02:18:55 +00:00
szaka
ba63b7daca initial CVS import 2006-10-30 22:32:48 +00:00