summaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:08:13 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:08:13 +0000
commitc31a05b15eb10df5b9a3daa9d9b1d6a5bc7918c5 (patch)
tree4aab201a8b40daa717615f9f3a7b9407a25936e6 /main.cc
parentAdding debian version 1.17~rc1-1. (diff)
downloadlzip-c31a05b15eb10df5b9a3daa9d9b1d6a5bc7918c5.tar.xz
lzip-c31a05b15eb10df5b9a3daa9d9b1d6a5bc7918c5.zip
Merging upstream version 1.17~rc2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--main.cc9
1 files changed, 5 insertions, 4 deletions
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;