summaryrefslogtreecommitdiffstats
path: root/ztest.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-04-10 15:19:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-04-10 15:19:00 +0000
commit6e01d7d8f65270f174ed4f161a5292aa5b89be0c (patch)
treeb73c1aad1d4cf13aad03fb2764f8123f266d27b4 /ztest.cc
parentReleasing debian version 1.5-5. (diff)
downloadzutils-6e01d7d8f65270f174ed4f161a5292aa5b89be0c.tar.xz
zutils-6e01d7d8f65270f174ed4f161a5292aa5b89be0c.zip
Merging upstream version 1.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--ztest.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/ztest.cc b/ztest.cc
index 8d9d8cd..6f0d209 100644
--- a/ztest.cc
+++ b/ztest.cc
@@ -1,5 +1,5 @@
-/* Ztest - verify integrity of compressed files
- Copyright (C) 2010-2016 Antonio Diaz Diaz.
+/* Ztest - verify the integrity of compressed files
+ Copyright (C) 2010-2017 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -56,8 +56,12 @@ void show_help()
"input is verified. Data read from standard input must be all in the same\n"
"compression format.\n"
"\nThe supported formats are bzip2, gzip, lzip and xz.\n"
- "\nNote that some xz files lack integrity information, and therefore can't\n"
- "be verified as reliably as the other formats can.\n"
+ "\nNote that error detection in the xz format is broken. First, some xz\n"
+ "files lack integrity information. Second, not all xz decompressors can\n"
+ "verify the integrity of all xz files. Third, section 2.1.1.2 'Stream\n"
+ "Flags' of the xz format specification allows xz decompressors to produce\n"
+ "garbage output without issuing any warning. Therefore, xz files can't\n"
+ "always be verified as reliably as files in the other formats can.\n"
"\nUsage: ztest [options] [files]\n"
"\nExit status is 0 if all compressed files verify OK, 1 if environmental\n"
"problems (file not found, invalid flags, I/O errors, etc), 2 if any\n"
@@ -106,7 +110,7 @@ int ztest_stdin( const int infd, int format_index,
if( pid == 0 ) // child1 (compressor feeder)
{
if( close( fda[0] ) != 0 ||
- !feed_data( infd, fda[1], magic_data, magic_size ) )
+ !feed_data( "", infd, fda[1], magic_data, magic_size ) )
_exit( 1 );
if( close( fda[1] ) != 0 )
{ show_close_error(); _exit( 1 ); }