summaryrefslogtreecommitdiffstats
path: root/unzcrash.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--unzcrash.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/unzcrash.cc b/unzcrash.cc
index a118b9d..d22b650 100644
--- a/unzcrash.cc
+++ b/unzcrash.cc
@@ -1,6 +1,6 @@
/* Unzcrash - Tests robustness of decompressors to corrupted data.
Inspired by unzcrash.c from Julian Seward's bzip2.
- Copyright (C) 2008-2018 Antonio Diaz Diaz.
+ Copyright (C) 2008-2019 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
@@ -22,6 +22,8 @@
(eg, bug) which caused unzcrash to panic.
*/
+#define _FILE_OFFSET_BITS 64
+
#include <algorithm>
#include <cerrno>
#include <climits>
@@ -49,7 +51,6 @@ void show_error( const char * const msg, const int errcode = 0,
namespace {
-const char * const Program_name = "Unzcrash";
const char * const program_name = "unzcrash";
const char * invocation_name = 0;
@@ -58,9 +59,8 @@ int verbosity = 0;
void show_help()
{
- std::printf( "%s - Tests robustness of decompressors to corrupted data.\n", Program_name );
- std::printf( "\nUsage: %s [options] 'lzip -t' file.lz\n", invocation_name );
- std::printf( "\nBy default, unzcrash reads the specified file and then repeatedly\n"
+ std::printf( "Unzcrash tests the robustness of decompressors to corrupted data.\n"
+ "\nBy default, unzcrash reads the specified file and then repeatedly\n"
"decompresses it, increasing 256 times each byte of the compressed data,\n"
"so as to test all possible one-byte errors. Note that it may take years\n"
"or even centuries to test all possible one-byte errors in a large file\n"
@@ -86,7 +86,8 @@ void show_help()
"\nIn order to compare the outputs, unzcrash needs a zcmp program able to\n"
"understand the format being tested. For example the one provided by zutils.\n"
"Use '--zcmp=false' to disable comparisons.\n"
- "\nOptions:\n"
+ "\nUsage: %s [options] 'lzip -t' file.lz\n", invocation_name );
+ std::printf( "\nOptions:\n"
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"
" -b, --bits=<range> test N-bit errors instead of full byte\n"