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/sshpass-1.06/main.c

FINAL RESULTS:

data/sshpass-1.06/main.c:297:2:  [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( new_argv[0], new_argv );
data/sshpass-1.06/main.c:107:17:  [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( (opt=getopt(argc, argv, "+f:d:p:P:heVv"))!=-1 && error==-1 ) {
data/sshpass-1.06/main.c:148:26:  [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.
	    args.pwsrc.password=getenv("SSHPASS");
data/sshpass-1.06/main.c:59:12:  [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).
    return open("/dev/ptmx", flags);
data/sshpass-1.06/main.c:121:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    args.pwsrc.fd=atoi(optarg);
data/sshpass-1.06/main.c:239:12:  [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).
    ourtty=open("/dev/tty", 0);
data/sshpass-1.06/main.c:282: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).
        slavept=open(name, O_RDWR );
data/sshpass-1.06/main.c:309:13:  [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).
    slavept=open(name, O_RDWR|O_NOCTTY );
data/sshpass-1.06/main.c:383:5:  [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 buffer[256];
data/sshpass-1.06/main.c:463: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).
	    int srcfd=open( args.pwsrc.filename, O_RDONLY );
data/sshpass-1.06/main.c:483: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 buffer[40];
data/sshpass-1.06/main.c:395:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int numread=read(fd, buffer, sizeof(buffer)-1 );
data/sshpass-1.06/main.c:471:34:  [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, args.pwsrc.password, strlen( args.pwsrc.password ) );
data/sshpass-1.06/main.c:485:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int numread=read( srcfd, buffer, sizeof(buffer) );

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 509 in approximately 0.02 seconds (22368 lines/second)
Physical Source Lines of Code (SLOC) = 346
Hits@level = [0]   9 [1]   3 [2]   8 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  23 [1+]  14 [2+]  11 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 66.474 [1+] 40.4624 [2+] 31.7919 [3+] 8.67052 [4+] 2.89017 [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.