From 596a882bb1df38eb6ff3bb8d52b52d5d9cd82abb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 11:08:04 +0100 Subject: Adding upstream version 1.17~rc2. Signed-off-by: Daniel Baumann --- main.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'main.cc') diff --git a/main.cc b/main.cc index 1fc42de..27cc156 100644 --- a/main.cc +++ b/main.cc @@ -227,7 +227,7 @@ unsigned long long getnum( const char * const ptr, int get_dict_size( const char * const arg ) { char * tail; - int bits = std::strtol( arg, &tail, 0 ); + const int bits = std::strtol( arg, &tail, 0 ); if( bits >= min_dictionary_bits && bits <= max_dictionary_bits && *tail == 0 ) return ( 1 << bits ); @@ -566,8 +566,9 @@ int decompress( const int infd, const Pretty_print & pp, const bool testing ) header.version() ); } retval = 2; break; } - if( header.dictionary_size() < min_dictionary_size || - header.dictionary_size() > max_dictionary_size ) + const unsigned dictionary_size = header.dictionary_size(); + if( dictionary_size < min_dictionary_size || + dictionary_size > max_dictionary_size ) { pp( "Invalid dictionary size in member header." ); retval = 2; break; } if( verbosity >= 2 || ( verbosity == 1 && first_member ) ) @@ -691,7 +692,7 @@ int main( const int argc, const char * const argv[] ) { 3 << 23, 132 }, /* -8 */ { 1 << 25, 273 } }; /* -9 */ Lzma_options encoder_options = option_mapping[6]; // default = "-6" - const unsigned long long max_member_size = 0x0100000000000000ULL; + const unsigned long long max_member_size = 0x0008000000000000ULL; const unsigned long long max_volume_size = 0x4000000000000000ULL; unsigned long long member_size = max_member_size; unsigned long long volume_size = 0; -- cgit v1.2.3