summaryrefslogtreecommitdiffstats
path: root/ztest.cc
diff options
context:
space:
mode:
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 ); }