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/chkservice-0.3/include/chk-ctl.h
Examining data/chkservice-0.3/include/chk-systemd.h
Examining data/chkservice-0.3/include/chk-ui.h
Examining data/chkservice-0.3/include/chk.h
Examining data/chkservice-0.3/src/chk-ctl.cpp
Examining data/chkservice-0.3/src/chk-systemd-utils.cpp
Examining data/chkservice-0.3/src/chk-systemd.cpp
Examining data/chkservice-0.3/src/chk-wmain.cpp
Examining data/chkservice-0.3/src/chk-wutils.cpp
Examining data/chkservice-0.3/src/chkservice.cpp
Examining data/chkservice-0.3/tests/chkctl-test.cpp
Examining data/chkservice-0.3/tests/chksystemd-test.cpp
Examining data/chkservice-0.3/tests/chkui-test.cpp
Examining data/chkservice-0.3/tests/main-test.cpp

FINAL RESULTS:

data/chkservice-0.3/src/chk-systemd-utils.cpp:61:21:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      if ((status = system(sysvCMD.c_str())) == -1) {
data/chkservice-0.3/src/chk-wmain.cpp:184:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(searchString, "%s%c", searchString, key);
data/chkservice-0.3/src/chk-wmain.cpp:197:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
     sprintf(text, "%s%s", text, searchString);
data/chkservice-0.3/src/chkservice.cpp:32:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stdout, ABOUT_INFO, VERSION);
data/chkservice-0.3/include/chk-ui.h:84:5:  [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 searchString[BUFSIZ] = "";
data/chkservice-0.3/src/chk-systemd.cpp:519: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 *names[ids->size()];
data/chkservice-0.3/src/chk-systemd.cpp:541: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 *names[ids->size()];
data/chkservice-0.3/src/chk-wmain.cpp:194: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 text[BUFSIZ] = "/";
data/chkservice-0.3/src/chk-wmain.cpp:487: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 emptyStr[winSize->w + 1];
data/chkservice-0.3/src/chk-wmain.cpp:164:14:  [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).
      slen = strlen(searchString);
data/chkservice-0.3/src/chk-wutils.cpp:60:12:  [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).
  length = strlen(string);

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 2145 in approximately 0.07 seconds (28740 lines/second)
Physical Source Lines of Code (SLOC) = 1477
Hits@level = [0]   0 [1]   2 [2]   5 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  11 [1+]  11 [2+]   9 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 7.44753 [1+] 7.44753 [2+] 6.09343 [3+] 2.70819 [4+] 2.70819 [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.