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/fl-cow-0.6/fl-cow/fl-cow.c
Examining data/fl-cow-0.6/test/flcow-test.c
Examining data/fl-cow-0.6/symcfg.c

FINAL RESULTS:

data/fl-cow-0.6/fl-cow/fl-cow.c:47:34:  [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.
#define DPRINTF(format, args...) fprintf(stderr, format, ## args)
data/fl-cow-0.6/fl-cow/fl-cow.c:92: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 ((home = getenv("HOME")) != NULL) {
data/fl-cow-0.6/fl-cow/fl-cow.c:110:15:  [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.
	for (excld = getenv("FLCOW_PATH"); excld;) {
data/fl-cow-0.6/fl-cow/fl-cow.c:87: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 fpath[FLCLOW_MAXPATH];
data/fl-cow-0.6/fl-cow/fl-cow.c:105:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(fpath + len, name, nlen + 1);
data/fl-cow-0.6/fl-cow/fl-cow.c:127: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 fpath[FLCLOW_MAXPATH];
data/fl-cow-0.6/test/flcow-test.c:61: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 buf[512], name1[512], name2[512];
data/fl-cow-0.6/test/flcow-test.c:66:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(name1, ",,flcow-test1++.%u", getpid());
data/fl-cow-0.6/test/flcow-test.c:73:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(name2, ",,flcow-test2++.%u", getpid());
data/fl-cow-0.6/test/flcow-test.c:121:24:  [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 ((res = test_flcow(open, "open")) != 0)
data/fl-cow-0.6/fl-cow/fl-cow.c:89:9:  [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).
	nlen = strlen(name);
data/fl-cow-0.6/fl-cow/fl-cow.c:93:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(fpath, home, sizeof(fpath) - 1);
data/fl-cow-0.6/fl-cow/fl-cow.c:102: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).
		if ((len = strlen(fpath)) + nlen + 2 < sizeof(fpath)) {
data/fl-cow-0.6/fl-cow/fl-cow.c:112: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).
			len = strlen(excld);
data/fl-cow-0.6/test/flcow-test.c:52:18:  [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).
	write(fd, data, strlen(data));

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 417 in approximately 0.11 seconds (3822 lines/second)
Physical Source Lines of Code (SLOC) = 278
Hits@level = [0]  17 [1]   5 [2]   7 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  32 [1+]  15 [2+]  10 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 115.108 [1+] 53.9568 [2+] 35.9712 [3+] 10.7914 [4+] 3.59712 [5+]   0
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.