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/kali-3.1/panel.c
Examining data/kali-3.1/icons.h
Examining data/kali-3.1/io.h
Examining data/kali-3.1/kali.h
Examining data/kali-3.1/panel.h
Examining data/kali-3.1/symmetry.h
Examining data/kali-3.1/callbacks.c
Examining data/kali-3.1/help.h
Examining data/kali-3.1/main.h
Examining data/kali-3.1/psio.c
Examining data/kali-3.1/symmetry.c
Examining data/kali-3.1/xio.c
Examining data/kali-3.1/printmain.c
Examining data/kali-3.1/kali.c

FINAL RESULTS:

data/kali-3.1/callbacks.c:310:11:  [4] (shell) popen:
  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.
    psf = popen(filename, "w");
data/kali-3.1/callbacks.c:359:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(quest, "Do you really want to print this on the \"%s\" printer?",
data/kali-3.1/callbacks.c:363:9:  [4] (shell) popen:
  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.
    p = popen(" lpr ","w");
data/kali-3.1/callbacks.c:358:19:  [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.
  char *printer = getenv("PRINTER");
data/kali-3.1/callbacks.c:289:9:  [2] (misc) fopen:
  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).
  pat = fopen(filename, "w");
data/kali-3.1/callbacks.c:312:11:  [2] (misc) fopen:
  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).
    psf = fopen(filename, "w");
data/kali-3.1/callbacks.c:340:9:  [2] (misc) fopen:
  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).
  pat = fopen(filename, "r");
data/kali-3.1/callbacks.c:357: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 quest[80];
data/kali-3.1/kali.c:369:2:  [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 chars[1];
data/kali-3.1/kali.c:449:29:  [2] (misc) fopen:
  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 (fname != NULL && (f = fopen(fname, "r")) == NULL)
data/kali-3.1/kali.c:457: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 *fakeargv[2] = { "kali", NULL };
data/kali-3.1/printmain.c:37:11:  [2] (misc) fopen:
  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).
    pat = fopen(argv[1],"r");
data/kali-3.1/xio.c:159:15:  [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).
  tp.nitems = strlen(title);

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 4540 in approximately 0.19 seconds (23796 lines/second)
Physical Source Lines of Code (SLOC) = 3473
Hits@level = [0]  67 [1]   1 [2]   8 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+]  80 [1+]  13 [2+]  12 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 23.0348 [1+] 3.74316 [2+] 3.45523 [3+] 1.15174 [4+] 0.863807 [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.