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/fuse-posixovl-1.2.20120215+gitf5bfe35/lntest.c
Examining data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c
Examining data/fuse-posixovl-1.2.20120215+gitf5bfe35/socket.c

FINAL RESULTS:

data/fuse-posixovl-1.2.20120215+gitf5bfe35/lntest.c:48:2:  [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("cat f2");
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:212:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			ret = snprintf(dest, destsize, "/" HCB_PREFIX);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:214:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			ret = snprintf(dest, destsize, "%s/" HCB_PREFIX, src);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:784:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(out_ptr, read_ptr);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:818:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(out_ptr, read_ptr);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1937:14:  [3] (buffer) getopt:
  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 ((c = getopt(argc, argv, "1FS:")) > 0) {
data/fuse-posixovl-1.2.20120215+gitf5bfe35/lntest.c:18:8:  [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).
	*fd = open(path, O_RDWR);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:97: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[PATH_MAX], new_target[PATH_MAX];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:108: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 path[PATH_MAX];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:188:2:  [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(last, HL_INODE_PREFIX, HL_INODE_PREFIX_LEN);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:602: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 path[PATH_MAX];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:791:3:  [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(out_ptr, "%%(%02X)", *next);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1053:2:  [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(&info_l1, &info_l0, sizeof(info_l0));
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1073:2:  [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(sb, &info.sb, sizeof(*sb));
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1121: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 l1_path[PATH_MAX], l1_hcb[PATH_MAX];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1586: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 new_hcbpath[PATH_MAX];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1877: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[64];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1880:12:  [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("/etc/fuse.conf", "r")) == NULL)
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1935: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 xargs[256];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1960:17:  [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 ((root_fd = open(root_dir, O_DIRECTORY)) < 0) {
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1966: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).
	original_wd = open(".", O_DIRECTORY);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/socket.c:18: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[80];
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:171:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dest, src, n);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:252:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((ret = read(fd, info->buf, sizeof(info->buf) - 1)) < 0)
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:289:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(info->new_target, info->target, sizeof(info->new_target));
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:327:8:  [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).
	z   = strlen(info->buf);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:616: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).
		ret = strlen(name) + 1;
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:769: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).
			needed += strlen("%(XX)");
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:785: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).
			out_ptr += strlen(read_ptr);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:788:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(out_ptr, read_ptr, next - read_ptr);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:792: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).
		out_ptr += strlen("%(XX)");
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:810: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).
	char *out = malloc(strlen(read_ptr) + 1), *out_ptr = out;
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:819: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).
			out_ptr += strlen(read_ptr);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:827:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(out_ptr, read_ptr, next - read_ptr);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:829:32:  [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).
		read_ptr = seek_ptr = next + strlen("%(XX)");
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:911: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).
	return strlen(path) + 1 + HCB_PREFIX_LEN >= PATH_MAX;
data/fuse-posixovl-1.2.20120215+gitf5bfe35/posixovl.c:1959:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(0);
data/fuse-posixovl-1.2.20120215+gitf5bfe35/socket.c:27:6:  [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 (strlen(path1) > sizeof(sock1.sun_path)) {
data/fuse-posixovl-1.2.20120215+gitf5bfe35/socket.c:32:6:  [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 (strlen(path2) > sizeof(sock2.sun_path)) {
data/fuse-posixovl-1.2.20120215+gitf5bfe35/socket.c:55:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sock1.sun_path, path1, sizeof(sock1.sun_path));
data/fuse-posixovl-1.2.20120215+gitf5bfe35/socket.c:56:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sock2.sun_path, path2, sizeof(sock2.sun_path));
data/fuse-posixovl-1.2.20120215+gitf5bfe35/socket.c:87:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd2, buf, 80);

ANALYSIS SUMMARY:

Hits = 42
Lines analyzed = 2144 in approximately 0.07 seconds (30651 lines/second)
Physical Source Lines of Code (SLOC) = 1582
Hits@level = [0]  19 [1]  20 [2]  16 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+]  61 [1+]  42 [2+]  22 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 38.5588 [1+] 26.5487 [2+] 13.9064 [3+] 3.79267 [4+] 3.16056 [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.