summaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:08:04 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:08:04 +0000
commit596a882bb1df38eb6ff3bb8d52b52d5d9cd82abb (patch)
tree44baf26cf66a00cf6191bddad514b67fe589fbf6 /main.cc
parentAdding upstream version 1.17~rc1. (diff)
downloadlzip-596a882bb1df38eb6ff3bb8d52b52d5d9cd82abb.tar.xz
lzip-596a882bb1df38eb6ff3bb8d52b52d5d9cd82abb.zip
Adding upstream version 1.17~rc2.upstream/1.17_rc2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'main.cc')
-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;