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/userbindmount-0.1/libuserbindmount.c
Examining data/userbindmount-0.1/userbindmount.c
Examining data/userbindmount-0.1/userbindmount.h

FINAL RESULTS:

data/userbindmount-0.1/userbindmount.c:140:3:  [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(cmdargv[0], cmdargv);
data/userbindmount-0.1/userbindmount.c:92:12:  [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.
		if ((c = getopt_long(argc, argv, short_options, long_options, NULL)) == -1)
data/userbindmount-0.1/userbindmount.c:130: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 *argvsh[]={getenv("SHELL"),NULL};
data/userbindmount-0.1/libuserbindmount.c:50: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 map_file[PATH_MAX];
data/userbindmount-0.1/libuserbindmount.c:55:6:  [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).
	f = fopen(map_file, "w");
data/userbindmount-0.1/libuserbindmount.c:61:6:  [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).
	f = fopen(map_file, "w");
data/userbindmount-0.1/libuserbindmount.c:67:6:  [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).
	f = fopen(map_file, "w");
data/userbindmount-0.1/libuserbindmount.c:77: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[1];
data/userbindmount-0.1/libuserbindmount.c:113:11:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	int fd = mkstemp(tmpname);
data/userbindmount-0.1/libuserbindmount.c:119: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[BUFSIZE];
data/userbindmount-0.1/userbindmount.c:63:4:  [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 string[len];
data/userbindmount-0.1/libuserbindmount.c:83:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(pipe_fd[0], &buf, sizeof(buf)) < 0)
data/userbindmount-0.1/libuserbindmount.c:120:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((retval = read(fd_in, buf, BUFSIZE)) > 0)
data/userbindmount-0.1/libuserbindmount.c:138:48:  [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 __common_userbindmount_tmp(-1, string, strlen(string), target, mode);
data/userbindmount-0.1/userbindmount.c:61:13:  [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).
		int len = strlen(source);

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 302 in approximately 0.02 seconds (15181 lines/second)
Physical Source Lines of Code (SLOC) = 242
Hits@level = [0]  12 [1]   4 [2]   8 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  27 [1+]  15 [2+]  11 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 111.57 [1+] 61.9835 [2+] 45.4545 [3+] 12.3967 [4+] 4.13223 [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.