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/bbrun-1.6/bbrun/bbrun.c
Examining data/bbrun-1.6/wmgeneral/misc.c
Examining data/bbrun-1.6/wmgeneral/misc.h
Examining data/bbrun-1.6/wmgeneral/list.h
Examining data/bbrun-1.6/wmgeneral/list.c
Examining data/bbrun-1.6/wmgeneral/wmgeneral.c
Examining data/bbrun-1.6/wmgeneral/wmgeneral.h

FINAL RESULTS:

data/bbrun-1.6/bbrun/bbrun.c:359:9:  [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.
        system(backgroundCommand);
data/bbrun-1.6/bbrun/bbrun.c:362:11:  [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.
          system(backgroundCommand);
data/bbrun-1.6/bbrun/bbrun.c:371:7:  [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.
      system(backgroundCommand);
data/bbrun-1.6/wmgeneral/misc.c:160:9:  [4] (shell) execvp:
  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.
        execvp(argv[0], args);
data/bbrun-1.6/bbrun/bbrun.c:131:20:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((curOpt = getopt_long(argc, argv, "hi:vwa", validOptions, &optionIndex)) > -1) {
data/bbrun-1.6/bbrun/bbrun.c:158:30:  [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.
    strncat(historyFilename, getenv("HOME"), MAXPATHLEN - strlen(DEFAULT_HIST_FILENAME) - 1);
data/bbrun-1.6/bbrun/bbrun.c:478:16:  [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.
    if ((pwd = getenv("PWD")))	// In case PWD is not availalbe
data/bbrun-1.6/bbrun/bbrun.c:28:1:  [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 wminet_mask_bits[16 * 16];
data/bbrun-1.6/bbrun/bbrun.c:36:1:  [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 historyFilename[MAXPATHLEN + 1];    // The path to the history file, +1 is to allow room for '\0'
data/bbrun-1.6/bbrun/bbrun.c:170: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[MAXCMDLEN];
data/bbrun-1.6/bbrun/bbrun.c:177:13:  [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 ((fp = fopen(historyFilename, "r")) == 0) {
data/bbrun-1.6/bbrun/bbrun.c:178:15:  [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 ((fp = fopen(historyFilename, "w")) == 0) {
data/bbrun-1.6/bbrun/bbrun.c:306:13:  [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 ((fp = fopen(historyFilename, "w")) == 0) {
data/bbrun-1.6/bbrun/bbrun.c:338: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 backgroundCommand[MAXCMDLEN + 3];
data/bbrun-1.6/bbrun/bbrun.c:349:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat(backgroundCommand, " &");
data/bbrun-1.6/wmgeneral/wmgeneral.c:111: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	temp[128];
data/bbrun-1.6/wmgeneral/wmgeneral.c:116:7:  [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).
	fp = fopen(filename, "r");
data/bbrun-1.6/wmgeneral/wmgeneral.c:146: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	temp[128];
data/bbrun-1.6/wmgeneral/wmgeneral.c:152:7:  [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).
	fp = fopen(filename, "r");
data/bbrun-1.6/bbrun/bbrun.c:137:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(historyFilename, optarg, MAXPATHLEN);
data/bbrun-1.6/bbrun/bbrun.c:158:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(historyFilename, getenv("HOME"), MAXPATHLEN - strlen(DEFAULT_HIST_FILENAME) - 1);
data/bbrun-1.6/bbrun/bbrun.c:158:59:  [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).
    strncat(historyFilename, getenv("HOME"), MAXPATHLEN - strlen(DEFAULT_HIST_FILENAME) - 1);
data/bbrun-1.6/bbrun/bbrun.c:159:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(historyFilename, DEFAULT_HIST_FILENAME, strlen(DEFAULT_HIST_FILENAME));
data/bbrun-1.6/bbrun/bbrun.c:159:53:  [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).
    strncat(historyFilename, DEFAULT_HIST_FILENAME, strlen(DEFAULT_HIST_FILENAME));
data/bbrun-1.6/bbrun/bbrun.c:199:21:  [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).
      item = malloc(strlen(buf));
data/bbrun-1.6/bbrun/bbrun.c:200:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(item, buf, strlen(buf));
data/bbrun-1.6/bbrun/bbrun.c:200:26:  [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).
      strncpy(item, buf, strlen(buf));
data/bbrun-1.6/bbrun/bbrun.c:201: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).
      item[strlen(buf)- 1] = 0x0;			// Remove the newline char
data/bbrun-1.6/bbrun/bbrun.c:285:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(item, newHistoryItem, MAXCMDLEN + 1);
data/bbrun-1.6/bbrun/bbrun.c:286:10:  [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).
    item[strlen(item)] = 0x0;
data/bbrun-1.6/bbrun/bbrun.c:348:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(backgroundCommand, command, MAXCMDLEN);
data/bbrun-1.6/wmgeneral/misc.c:65:22:  [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).
    t = ret = malloc(strlen(word)+1);
data/bbrun-1.6/wmgeneral/wmgeneral.c:125:11:  [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).
					p += strlen(keys[key].label);
data/bbrun-1.6/wmgeneral/wmgeneral.c:158:11:  [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).
					p += strlen(keys[key].label);

ANALYSIS SUMMARY:

Hits = 34
Lines analyzed = 1468 in approximately 0.05 seconds (28363 lines/second)
Physical Source Lines of Code (SLOC) = 959
Hits@level = [0]  43 [1]  15 [2]  12 [3]   3 [4]   4 [5]   0
Hits@level+ = [0+]  77 [1+]  34 [2+]  19 [3+]   7 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 80.292 [1+] 35.4536 [2+] 19.8123 [3+] 7.29927 [4+] 4.17101 [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.