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/plzip-1.8/list.cc
Examining data/plzip-1.8/lzip_index.h
Examining data/plzip-1.8/dec_stdout.cc
Examining data/plzip-1.8/arg_parser.h
Examining data/plzip-1.8/compress.cc
Examining data/plzip-1.8/arg_parser.cc
Examining data/plzip-1.8/lzip_index.cc
Examining data/plzip-1.8/dec_stream.cc
Examining data/plzip-1.8/main.cc
Examining data/plzip-1.8/lzip.h
Examining data/plzip-1.8/decompress.cc

FINAL RESULTS:

data/plzip-1.8/dec_stream.cc:304:16:  [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( data, buffer + pos, newpos - pos );
data/plzip-1.8/dec_stream.cc:318: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( data, buffer + pos, size + hsize - pos );
data/plzip-1.8/dec_stream.cc:328: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( data, buffer + pos, buffer_size - pos );
data/plzip-1.8/dec_stream.cc:331: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( base_buffer, base_buffer + buffer_size, tsize + hsize );
data/plzip-1.8/lzip.h:94: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/plzip-1.8/lzip_index.cc:55: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/plzip-1.8/lzip_index.cc:118: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/plzip-1.8/main.cc:195: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/plzip-1.8/main.cc:205: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/plzip-1.8/main.cc:206: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/plzip-1.8/main.cc:347: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/plzip-1.8/main.cc:397: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/plzip-1.8/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/plzip-1.8/compress.cc:51: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/plzip-1.8/lzip.h:46: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/plzip-1.8/main.cc:230: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/plzip-1.8/main.cc:264: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/plzip-1.8/main.cc:268: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;

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 3635 in approximately 0.12 seconds (29913 lines/second)
Physical Source Lines of Code (SLOC) = 2915
Hits@level = [0]  45 [1]   6 [2]  12 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  63 [1+]  18 [2+]  12 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 21.6123 [1+] 6.17496 [2+] 4.11664 [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.