Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/lzip-1.21/arg_parser.cc
Examining data/lzip-1.21/encoder_base.h
Examining data/lzip-1.21/fast_encoder.h
Examining data/lzip-1.21/main.cc
Examining data/lzip-1.21/lzip_index.h
Examining data/lzip-1.21/lzip.h
Examining data/lzip-1.21/decoder.cc
Examining data/lzip-1.21/encoder.cc
Examining data/lzip-1.21/encoder.h
Examining data/lzip-1.21/fast_encoder.cc
Examining data/lzip-1.21/decoder.h
Examining data/lzip-1.21/list.cc
Examining data/lzip-1.21/lzip_index.cc
Examining data/lzip-1.21/encoder_base.cc
Examining data/lzip-1.21/arg_parser.h

FINAL RESULTS:

data/lzip-1.21/decoder.h:69:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      std::memcpy( outbuf + sz, buffer + pos, rd );
data/lzip-1.21/decoder.h:259:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy( buffer + lpos, buffer + i, len );
data/lzip-1.21/lzip.h:214:27:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  void set_magic() { std::memcpy( data, lzip_magic, 4 ); data[4] = 1; }
data/lzip-1.21/lzip_index.cc:54:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[80];
data/lzip-1.21/lzip_index.cc:117:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy( buffer + rd_size, buffer, buffer_size - rd_size );
data/lzip-1.21/main.cc:184:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[80];
data/lzip-1.21/main.cc:194:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[bufsize];
data/lzip-1.21/main.cc:195:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char * const prefix[8] =
data/lzip-1.21/main.cc:335:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int infd = open( name, O_RDONLY | O_BINARY );
data/lzip-1.21/main.cc:385:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  outfd = open( output_filename.c_str(), flags, outfd_mode );
data/lzip-1.21/arg_parser.cc:40:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if( std::strlen( options[i].name ) == len )	// Exact match found
data/lzip-1.21/decoder.cc:43:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const int n = read( fd, buf + sz, size - sz );
data/lzip-1.21/lzip.h:132:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const unsigned stdin_name_len = std::strlen( stdin_name );
data/lzip-1.21/main.cc:219:53:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
                           const unsigned long long ulimit )
data/lzip-1.21/main.cc:253:11:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
      if( ulimit / factor >= result ) result *= factor;
data/lzip-1.21/main.cc:257:47:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
  if( !errno && ( result < llimit || result > ulimit ) ) errno = ERANGE;
data/lzip-1.21/main.cc:488:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const unsigned ext_len = std::strlen( known_extensions[0].from );

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 4462 in approximately 0.14 seconds (32430 lines/second)
Physical Source Lines of Code (SLOC) = 3629
Hits@level = [0]  39 [1]   7 [2]  10 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  56 [1+]  17 [2+]  10 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 15.4312 [1+] 4.68449 [2+] 2.75558 [3+]   0 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.