summaryrefslogtreecommitdiffstats
path: root/lzip_index.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lzip_index.cc')
-rw-r--r--lzip_index.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/lzip_index.cc b/lzip_index.cc
index b886d2b..63952de 100644
--- a/lzip_index.cc
+++ b/lzip_index.cc
@@ -1,5 +1,5 @@
/* Tarlz - Archiver with multimember lzip compression
- Copyright (C) 2013-2022 Antonio Diaz Diaz.
+ Copyright (C) 2013-2023 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
@@ -50,10 +50,10 @@ const char * bad_version( const unsigned version )
bool Lzip_index::check_header_error( const Lzip_header & header,
const bool first )
{
- if( !header.verify_magic() )
+ if( !header.check_magic() )
{ error_ = bad_magic_msg; retval_ = 2; if( first ) bad_magic_ = true;
return true; }
- if( !header.verify_version() )
+ if( !header.check_version() )
{ error_ = bad_version( header.version() ); retval_ = 2; return true; }
if( !isvalid_ds( header.dictionary_size() ) )
{ error_ = bad_dict_msg; retval_ = 2; return true; }
@@ -112,21 +112,21 @@ bool Lzip_index::skip_trailing_data( const int fd, unsigned long long & pos,
const unsigned long long member_size = trailer.member_size();
if( member_size == 0 ) // skip trailing zeros
{ while( i > Lzip_trailer::size && buffer[i-9] == 0 ) --i; continue; }
- if( member_size > ipos + i || !trailer.verify_consistency() )
+ if( member_size > ipos + i || !trailer.check_consistency() )
continue;
Lzip_header header;
if( !read_header( fd, header, ipos + i - member_size ) ) return false;
- if( !header.verify() ) continue;
+ if( !header.check() ) continue;
const Lzip_header & header2 = *(const Lzip_header *)( buffer + i );
const bool full_h2 = bsize - i >= Lzip_header::size;
- if( header2.verify_prefix( bsize - i ) ) // last member
+ if( header2.check_prefix( bsize - i ) ) // last member
{
if( !full_h2 ) error_ = "Last member in input file is truncated.";
else if( !check_header_error( header2, false ) )
error_ = "Last member in input file is truncated or corrupt.";
retval_ = 2; return false;
}
- if( !loose_trailing && full_h2 && header2.verify_corrupt() )
+ if( !loose_trailing && full_h2 && header2.check_corrupt() )
{ error_ = corrupt_mm_msg; retval_ = 2; return false; }
if( !ignore_trailing )
{ error_ = trailing_msg; retval_ = 2; return false; }
@@ -175,7 +175,7 @@ Lzip_index::Lzip_index( const int infd, const bool ignore_trailing,
pos - Lzip_trailer::size ) != Lzip_trailer::size )
{ set_errno_error( "Error reading member trailer: " ); break; }
const unsigned long long member_size = trailer.member_size();
- if( member_size > pos || !trailer.verify_consistency() ) // bad trailer
+ if( member_size > pos || !trailer.check_consistency() ) // bad trailer
{
if( member_vector.empty() )
{ if( skip_trailing_data( infd, pos, ignore_trailing, loose_trailing ) )
@@ -184,7 +184,7 @@ Lzip_index::Lzip_index( const int infd, const bool ignore_trailing,
break;
}
if( !read_header( infd, header, pos - member_size ) ) break;
- if( !header.verify() ) // bad header
+ if( !header.check() ) // bad header
{
if( member_vector.empty() )
{ if( skip_trailing_data( infd, pos, ignore_trailing, loose_trailing ) )