summaryrefslogtreecommitdiffstats
path: root/repair.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:16:06 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:16:06 +0000
commit0d53d0bcfd869d5b4eb69238c0c0022debc3aa60 (patch)
tree9e0fbce89572e5400e31491fa3130b220afcf189 /repair.cc
parentAdding upstream version 1.13~rc1. (diff)
downloadlziprecover-0d53d0bcfd869d5b4eb69238c0c0022debc3aa60.tar.xz
lziprecover-0d53d0bcfd869d5b4eb69238c0c0022debc3aa60.zip
Adding upstream version 1.13~rc2.upstream/1.13_rc2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'repair.cc')
-rw-r--r--repair.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/repair.cc b/repair.cc
index 8a92e59..38ff932 100644
--- a/repair.cc
+++ b/repair.cc
@@ -24,6 +24,7 @@
#include <string>
#include <vector>
#include <stdint.h>
+#include <unistd.h>
#include <sys/stat.h>
#include "lzip.h"
@@ -38,7 +39,7 @@ int repair_file( const std::string & input_filename,
const long long isize = lseek( infd, 0, SEEK_END );
if( isize < 0 )
{ show_error( "Input file is not seekable", errno ); return 1; }
- if( isize < 36 )
+ if( isize < min_member_size )
{ show_error( "Input file is too short." ); return 2; }
if( !verify_single_member( infd, isize ) ) return 2;
if( lseek( infd, 0, SEEK_SET ) < 0 )