From 74a670128cf5739d225b8a881f549af2e83d861f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 5 Jan 2019 21:07:45 +0100 Subject: Merging upstream version 1.21. Signed-off-by: Daniel Baumann --- unzcrash.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'unzcrash.cc') 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 #include #include @@ -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= test N-bit errors instead of full byte\n" -- cgit v1.2.3