Erik Larsson
11a3997a0d
Merge tag '2021.8.22' into edge.strict_endians
...
Conflicts:
libntfs-3g/attrib.c
libntfs-3g/bootsect.c
ntfsprogs/ntfsfix.c
2021-09-06 15:12:08 +02:00
Jean-Pierre André
81725f6a54
Made sure the requested compression block size is supported
...
Compressed files can only be opened if NTFS version < 3.0, and
the only supported compression block size is 16 clusters long.
2021-07-19 09:23:23 +02:00
Jean-Pierre André
218d93b37b
Cleaned the tail of compressed buffer before writing a full cluster
...
When appending to an existing compressed file, the last block must first
be decompressed. When doing so, clear the tail of buffer in order to not
leak unrelated data.
2021-05-17 15:38:20 +03:00
Erik Larsson
a00610ed15
Merge branch 'edge' into edge.strict_endians
...
Conflicts:
include/ntfs-3g/layout.h
libntfs-3g/acls.c
libntfs-3g/attrib.c
libntfs-3g/bootsect.c
libntfs-3g/dir.c
libntfs-3g/mft.c
libntfs-3g/reparse.c
ntfsprogs/ntfsinfo.c
ntfsprogs/ntfsresize.c
ntfsprogs/playlog.c
src/lowntfs-3g.c
src/ntfs-3g_common.c
2021-03-05 14:48:11 +02:00
Jean-Pierre André
1bc996f52f
Avoided information leak when processing garbled compressed data
...
When a compressed file has been deteriorated through hardware error
or accidental overwriting, some unrelated data could be leaked.
Make sure to zero fill the buffer when this happens.
2020-08-14 11:36:57 +02:00
Erik Larsson
34bb449324
Merge branch 'edge' into edge.strict_endians
...
Conflicts:
libntfs-3g/dir.c
libntfs-3g/index.c
libntfs-3g/runlist.c
ntfsprogs/ntfsfix.c
ntfsprogs/ntfsinfo.c
2016-02-05 18:02:02 +01:00
Erik Larsson
9893ea9ee6
Merge endianness fixes.
...
Conflicts:
libntfs-3g/attrib.c
2016-01-28 09:22:42 +01:00
Erik Larsson
760ddd62cf
Merge endianness fixes required for the strict endians code to compile.
...
Conflicts:
libntfs-3g/attrib.c
libntfs-3g/dir.c
libntfs-3g/logfile.c
libntfs-3g/volume.c
ntfsprogs/ntfscp.c
ntfsprogs/ntfsdump_logfile.c
ntfsprogs/ntfsfallocate.c
ntfsprogs/ntfsfix.c
ntfsprogs/ntfsinfo.c
ntfsprogs/ntfsresize.c
ntfsprogs/ntfstruncate.c
2016-01-28 09:21:09 +01:00
Erik Larsson
85588b8e92
Replace all le16 "not" negations with le16_not(...).
2016-01-28 08:28:59 +01:00
Erik Larsson
1500a77676
Replace all le32 "or" calculations with le32_or(...).
2016-01-28 08:28:54 +01:00
Erik Larsson
7b3700ed5e
Replace all le32 "and" calculations with le32_and(...).
2016-01-28 08:28:51 +01:00
Erik Larsson
2b4c3a618c
Replace all le16 "and" calculations with le16_and(...).
2016-01-28 08:28:50 +01:00
Erik Larsson
59a05b5c34
Replace all le16 usage of the '!=' operation with "!le16_eq(...)".
2016-01-28 08:28:25 +01:00
Erik Larsson
f076fae75a
Fix endianness issues in log and terminal output.
...
This commit addresses issues where little-endian variables are emitted
raw to a log or output stream which is to be interpreted by the user.
Outputting data in non-native endianness can cause confusion for anybody
attempting to debug issues with a file system.
2015-12-21 23:31:09 +01:00
Jean-Pierre André
5741f54529
Zeroed uninitialized bytes before writing compressed data
...
Compressed records may be written as full clusters even though cluster
tails are meaningless. This is to avoid the lower levels doing a read-
modify-write cycle. Be sure to zero the meaningless bytes to avoid
leaking information.
Contributed by Eric Biggers
2015-04-17 11:31:47 +02:00
Jean-Pierre André
b6152757c5
Reengineered the compression algorithm
...
This patch changes the algorithm to use hash chains instead of binary
trees, with much stronger hashing. It also introduces useful (for
performance) parameters, such as the "nice match length" and "maximum
search depth", that are similar to those used in other commonly used
compression algorithms such as zlib's DEFLATE implementation.
The speed improvement is very significant, with some loss of compression
rate. The compression rate is still better than then Windows one.
Contributed by Eric Biggers
2014-09-02 09:45:16 +02:00
Jean-Pierre André
ea8e192613
Traced dirtying runlists and updated them accordingly
...
Use a new flag to trace changes to a runlist and avoid recomputing the
runlist when no actual change occurred.
2014-03-11 10:11:00 +01:00
Jean-Pierre André
66cdec13d9
Fixed processing compressed data beyond file size
...
Windows 8 does not zero any more the end of a compression block beyond
what is needed to reach the end of a file. We must now be careful not
to decompress more data than needed.
2013-05-30 10:23:04 +02:00
Jean-Pierre André
919eeb71df
Improved compression (faster)
2011-07-05 12:17:30 +02:00
Jean-Pierre André
a46a395006
Updated copyright notices
2011-02-08 13:52:12 +01:00
Jean-Pierre André
d58b21ec1d
Fixed possible wrong hole size when overwriting compressed data
2011-02-08 13:52:12 +01:00
Jean-Pierre André
48caa7a45e
Took care of alignments needed on some processors
2010-11-09 09:43:31 +01:00
Jean-Pierre André
400632dea5
Fixed updating compressed sizes
2010-07-22 15:00:37 +02:00
Jean-Pierre André
5533eb565f
Fixed bad sanity check before compressing (was permissive)
2010-07-22 14:40:24 +02:00
Jean-Pierre André
1377f009e7
Fixed error returns when writing compressed data
2010-07-22 14:39:19 +02:00
Jean-Pierre André
a52c79b46b
Fixed loops when trying to read a broken compressed file
2010-06-18 14:04:23 +02:00
Jean-Pierre André
cc4b358383
Fixed freeing a full compression block when fragmented
2010-05-28 16:33:50 +02:00
Jean-Pierre André
a192775e2a
developed overwriting compressed files
2010-05-25 10:25:31 +02:00
jpandre
c468e74acd
Avoided a compiler warning
2009-12-17 09:17:16 +00:00
jpandre
88473752c5
Allowed creating holes in compressed files
2009-08-11 08:02:59 +00:00
jpandre
9ce63a72d5
Fixed a data compression bug causing suboptimal compression
2009-06-17 08:07:58 +00:00
jpandre
bcc9b7dbdc
Fixed cluster releases for compressed files
2009-04-25 11:52:00 +00:00
jpandre
eb282c019a
Inserted a reference to lzhuf.c from which the search for matches was borrowed
2009-04-08 19:24:53 +00:00
jpandre
c86e0dbf6b
Improved the loop for searching matches
2009-04-08 19:21:57 +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
szaka
ba63b7daca
initial CVS import
2006-10-30 22:32:48 +00:00