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/kbackup-20.08.0/src/MainWindow.cxx
Examining data/kbackup-20.08.0/src/main.cxx
Examining data/kbackup-20.08.0/src/Archiver.cxx
Examining data/kbackup-20.08.0/src/SettingsDialog.cxx
Examining data/kbackup-20.08.0/src/Selector.cxx
Examining data/kbackup-20.08.0/src/MainWidget.cxx

FINAL RESULTS:

data/kbackup-20.08.0/src/Selector.cxx:43:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      const char *lc_collate = ::getenv("LC_COLLATE");
data/kbackup-20.08.0/src/Selector.cxx:266:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char *home = ::getenv("HOME");
data/kbackup-20.08.0/src/Archiver.cxx:278:15:  [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).
  if ( ! file.open(QIODevice::ReadOnly) )
data/kbackup-20.08.0/src/Archiver.cxx:391:15:  [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).
  if ( ! file.open(QIODevice::WriteOnly) )
data/kbackup-20.08.0/src/Archiver.cxx:945:47:  [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).
  while ( (sliceCapacity < 1024) || !archive->open(QIODevice::WriteOnly) )  // disk full ?
data/kbackup-20.08.0/src/Archiver.cxx:1146:13:  [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).
    tmpFile.open();  // size() only works if open
data/kbackup-20.08.0/src/Archiver.cxx:1178:14:  [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 buffer[BUFFER_SIZE];
data/kbackup-20.08.0/src/Archiver.cxx:1252:41:  [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).
  if ( (info.size() > 0) && !sourceFile.open(QIODevice::ReadOnly) )
data/kbackup-20.08.0/src/Archiver.cxx:1270: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 buffer[BUFFER_SIZE];
data/kbackup-20.08.0/src/Archiver.cxx:1353:19:  [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).
  if ( ! origFile.open(QIODevice::ReadOnly) )
data/kbackup-20.08.0/src/Archiver.cxx:1367:18:  [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).
    if ( !filter.open(QIODevice::WriteOnly) )
data/kbackup-20.08.0/src/Archiver.cxx:1377:12:  [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 buffer[BUFFER_SIZE];
data/kbackup-20.08.0/src/Selector.cxx:288:29:  [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).
  action = KStandardAction::open(this, SLOT(open()), actionCollection);
data/kbackup-20.08.0/src/Selector.cxx:288:45:  [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).
  action = KStandardAction::open(this, SLOT(open()), actionCollection);
data/kbackup-20.08.0/src/Selector.cxx:702:3:  [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).
  open();
data/kbackup-20.08.0/src/Selector.cxx:707:16:  [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).
void Selector::open()
data/kbackup-20.08.0/src/Archiver.cxx:596:58:  [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).
            sliceName = entryName.left(prefix.length() + strlen("yyyy.MM.dd-hh.mm.ss_"));
data/kbackup-20.08.0/src/Archiver.cxx:1183:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = tmpFile.read(buffer, BUFFER_SIZE);
data/kbackup-20.08.0/src/Archiver.cxx:1280:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    len = sourceFile.read(buffer, BUFFER_SIZE);
data/kbackup-20.08.0/src/Archiver.cxx:1389:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      len = origFile.read(buffer, BUFFER_SIZE);

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 3155 in approximately 0.11 seconds (28003 lines/second)
Physical Source Lines of Code (SLOC) = 2238
Hits@level = [0]   0 [1]   4 [2]  14 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  20 [1+]  20 [2+]  16 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 8.93655 [1+] 8.93655 [2+] 7.14924 [3+] 0.893655 [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.