1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
Commit graph

865 commits

Author SHA1 Message Date
Lasse Collin
b7ad23fa78 Fix exit status of xzgrep when grepping binary files.
When grepping binary files, grep may exit before it has
read all the input. In this case, gzip -q returns 2 (eating
SIGPIPE), but xz and bzip2 show SIGPIPE as the exit status
(e.g. 141). This causes wrong exit status when grepping
xz- or bzip2-compressed binary files.

The fix checks for the special exit status that indicates SIGPIPE.
It uses kill -l which should be supported everywhere since it
is in both SUSv2 (1997) and POSIX.1-2008.

Thanks to James Buren for the bug report.
2012-05-24 18:52:48 +03:00
Lasse Collin
4e19fbb04a Update THANKS. 2012-05-24 18:52:48 +03:00
Lasse Collin
c6fa03a427 Fix compiling with IBM XL C on AIX. 2012-05-24 18:47:52 +03:00
Lasse Collin
7b6ffc9864 Build: Upgrade m4/acx_pthread.m4 to the latest version.
It was renamed to ax_pthread.m4 in Autoconf Archive.
2012-05-24 18:37:08 +03:00
Lasse Collin
bfac2be502 Tests: Fix a compiler warning with _FORTIFY_SOURCE.
Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385
2012-05-24 18:24:44 +03:00
Lasse Collin
df85e15671 Docs: Explain the stable releases better in README. 2012-05-24 18:24:44 +03:00
Lasse Collin
d06d32f108 xz: Fix a typo in a comment.
Thanks to Bela Lubkin.
2011-11-04 17:57:45 +02:00
Lasse Collin
636fdcfbf5 Update THANKS. 2011-11-03 17:44:22 +02:00
Lasse Collin
55fd02f83e xz: Fix xz on EBCDIC systems.
Thanks to Chris Donawa.
2011-11-03 17:44:22 +02:00
Lasse Collin
4052f36053 Build: Fix "make check" on Windows. 2011-09-06 12:05:44 +03:00
Lasse Collin
0f25758459 Update THANKS. 2011-09-05 16:05:44 +03:00
Lasse Collin
70f03b51ff Workaround unusual SIZE_MAX on SCO OpenServer. 2011-09-05 16:05:44 +03:00
Lasse Collin
f138bdf76a Run the scripts with the correct shell in test_scripts.sh.
The scripts are now made executable in the build tree.
This way the scripts can be run like programs in
test_scripts.sh. Previously test_scripts.sh always
used sh but it's not correct if @POSIX_SHELL@ is set
to something else by configure.

Thanks to Jonathan Nieder for the patch.
2011-09-05 16:05:44 +03:00
Lasse Collin
2c144a0365 Fix exit status of "xzdiff foo.xz bar.xz".
xzdiff was clobbering the exit status from diff in a case
statement used to analyze the exit statuses from "xz" when
its operands were two compressed files. Save and restore
diff's exit status to fix this.

The bug is inherited from zdiff in GNU gzip and was fixed
there on 2009-10-09.

Thanks to Jonathan Nieder for the patch and
to Peter Pallinger for reporting the bug.
2011-09-05 16:05:44 +03:00
Anders F Bjorklund
edf339227a add build script for macosx universal 2011-07-07 23:09:11 +03:00
Lasse Collin
7fcc6334ea liblzma: Remove unneeded semicolon. 2011-06-16 12:16:05 +03:00
Lasse Collin
631f4d3ae6 Don't call close(-1) in tuklib_open_stdxxx() on error.
Thanks to Jim Meyering.
2011-05-28 18:54:42 +03:00
Lasse Collin
c89faf4c9e Translations: Update Italian translation.
Thanks to Milo Casagrande.
2011-05-28 09:47:56 +03:00
Lasse Collin
6fe2fc9b6a Tests: Add a test file for the bug in the previous commit. 2011-05-28 09:44:18 +03:00
Lasse Collin
6c4d4db2bc xz: Fix error handling in xz -lvv.
It could do an invalid free() and read past the end
of the uninitialized filters array.
2011-05-28 09:44:12 +03:00
Lasse Collin
844f84fcad liblzma: Handle allocation failures correctly in lzma_index_init().
Thanks to Jim Meyering.
2011-05-28 09:44:07 +03:00
Lasse Collin
240e8b9791 Build: Set GZIP_ENV=-9n in top-level Makefile.am. 2011-05-23 18:30:51 +03:00
Lasse Collin
e32cb264ea Bump version and soname for 5.0.3. 2011-05-21 16:59:22 +03:00
Lasse Collin
65cff45f8f Update NEWS for 5.0.3. 2011-05-21 16:56:53 +03:00
Lasse Collin
316c67ffda Add French translation.
It is known that the BCJ filter --help text is only
partially translated.
2011-05-21 16:29:11 +03:00
Lasse Collin
1931175eea xz: Translate also the string used to print the program name.
French needs a space before a colon, e.g. "xz : foo error".
2011-05-21 15:12:43 +03:00
Lasse Collin
841dc1f891 Update THANKS. 2011-05-17 12:28:18 +03:00
Lasse Collin
0f7e2d3624 Update INSTALL with a note about linker problem on OpenSolaris x86. 2011-05-17 12:28:14 +03:00
Lasse Collin
793d857e01 Build: Fix initialization of enable_check_* variables in configure.ac.
This doesn't matter much in practice since it is unlikely
that anyone would have such environment variable names.

Thanks to Wim Lewis.
2011-05-17 12:28:07 +03:00
Lasse Collin
afcff45cee Add underscores to attributes (__attribute((__foo__))). 2011-05-17 12:27:22 +03:00
Lasse Collin
22159c6ba2 Update THANKS. 2011-04-18 19:36:21 +03:00
Martin Väth
5e34990595 xzgrep: fix typo in $0 parsing
Reported-by: Diego Elio Pettenò <flameeyes@gentoo.org>
Signed-off-by: Martin Väth <vaeth@mathematik.uni-wuerzburg.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-18 19:36:14 +03:00
Lasse Collin
1125611b9b Remove doubled words from documentation and comments.
Spot candidates by running these commands:
  git ls-files |xargs perl -0777 -n \
    -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \
    -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'

Thanks to Jim Meyering for the original patch.
2011-04-12 12:03:31 +03:00
Lasse Collin
3f8fa53837 liblzma: Document lzma_easy_(enc|dec)oder_memusage() better too. 2011-04-11 21:04:24 +03:00
Lasse Collin
320d734c20 liblzma: Document lzma_raw_(enc|dec)oder_memusage() better.
It didn't mention the return value that is used if
an error occurs.
2011-04-11 20:59:20 +03:00
Lasse Collin
2ee4edeffc liblzma: Don't create an empty Block in lzma_stream_buffer_encode().
Empty Block was created if the input buffer was empty.
Empty Block wastes a few bytes of space, but more importantly
it triggers a bug in XZ Utils 5.0.1 and older when trying
to decompress such a file. 5.0.1 and older consider such
files to be corrupt. I thought that no encoder creates empty
Blocks when releasing 5.0.2 but I was wrong.
2011-04-11 14:00:55 +03:00
Lasse Collin
73f56fb87d liblzma: Fix API docs to mention LZMA_UNSUPPORTED_CHECK.
This return value was missing from the API comments of
four functions.
2011-04-11 14:00:50 +03:00
Lasse Collin
4ce1cf97a8 liblzma: Validate encoder arguments better.
The biggest problem was that the integrity check type
wasn't validated, and e.g. lzma_easy_buffer_encode()
would create a corrupt .xz Stream if given an unsupported
Check ID. Luckily applications don't usually try to use
an unsupport Check ID, so this bug is unlikely to cause
many real-world problems.
2011-04-11 14:00:46 +03:00
Lasse Collin
972f05d7a4 Update THANKS. 2011-04-09 18:30:59 +03:00
Lasse Collin
28154eeaf6 liblzma: Add missing #ifdefs to filter_common.c.
Passing --disable-decoders to configure broke a few
encoders due to missing #ifdefs in filter_common.c.

Thanks to Jason Gorski for the patch.
2011-04-09 18:30:53 +03:00
Lasse Collin
aa95516d3d liblzma: Fix a memory leak in stream_encoder.c.
It leaks old filter options structures (hundred bytes or so)
every time the lzma_stream is reinitialized. With the xz tool,
this happens when compressing multiple files.
2011-04-05 15:27:48 +03:00
Lasse Collin
58f52c72f4 Bumped version and liblzma soname to 5.0.2. 2011-04-01 08:47:46 +03:00
Lasse Collin
162779682e Updated NEWS for 5.0.2. 2011-04-01 08:47:20 +03:00
Lasse Collin
45553f9b4b Update INSTALL with another note about IRIX. 2011-03-31 15:07:08 +03:00
Lasse Collin
af9d48d551 Tests: Add a new file to test empty LZMA2 streams. 2011-03-31 13:08:10 +03:00
Lasse Collin
d099ef9f51 liblzma: Fix decoding of LZMA2 streams having no uncompressed data.
The decoder considered empty LZMA2 streams to be corrupt.
This shouldn't matter much with .xz files, because no encoder
creates empty LZMA2 streams in .xz. This bug is more likely
to cause problems in applications that use raw LZMA2 streams.
2011-03-31 13:08:05 +03:00
Lasse Collin
df87249b26 Scripts: Better fix for xzgrep.
Now it uses "grep -q".

Thanks to Gregory Margo.
2011-03-24 01:43:23 +02:00
Lasse Collin
68c453e1c7 Updated THANKS. 2011-03-24 01:24:16 +02:00
Lasse Collin
b441d39855 Scripts: Fix xzgrep -l.
It didn't work at all. It tried to use the -q option
for grep, but it appended it after "--". This works
around it by redirecting to /dev/null. The downside
is that this can be slower with big files compared
to proper use of "grep -q".

Thanks to Gregory Margo.
2011-03-24 01:24:12 +02:00
Lasse Collin
82d5164839 xz: Clean up suffix.c.
struct suffix_pair isn't needed in compresed_name()
so get rid of it there.
2011-02-04 22:49:31 +02:00