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/setserial-2.17/linux/serial.h
Examining data/setserial-2.17/pcmcia.c
Examining data/setserial-2.17/safety.h
Examining data/setserial-2.17/setserial.c
Examining data/setserial-2.17/version.h

FINAL RESULTS:

data/setserial-2.17/pcmcia.c:40:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if (access(devname,F_OK)) { 
data/setserial-2.17/pcmcia.c:60:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if (access(CARDCTL,F_OK)) return 1;
data/setserial-2.17/pcmcia.c:70:18:  [4] (shell) execl:
  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.
                 execl(CARDCTL,CARDCTL,"config",NULL);
data/setserial-2.17/pcmcia.c:118:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if (!access(*s,F_OK))
data/setserial-2.17/pcmcia.c:126:13:  [4] (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).
            strcat(dev,i);
data/setserial-2.17/setserial.c:776: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, "abgGqvVWz")) != EOF) {
data/setserial-2.17/linux/serial.h:24: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	reserved_char[1];
data/setserial-2.17/pcmcia.c:111: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 *i,**s,buffer[1024],dev[128];
data/setserial-2.17/pcmcia.c:119:17:  [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 ((stab = fopen(*s,"r"))!=NULL) {
data/setserial-2.17/pcmcia.c:125:13:  [2] (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). Risk is low because the source is a constant string.
            strcpy(dev,"/dev/");
data/setserial-2.17/setserial.c:451: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	buf1[40];
data/setserial-2.17/setserial.c:453: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).
	if ((fd = open(device, O_RDWR|O_NONBLOCK)) < 0) {
data/setserial-2.17/setserial.c:480:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(buf1, "infinite");
data/setserial-2.17/setserial.c:482:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(buf1, "none");
data/setserial-2.17/setserial.c:484:4:  [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(buf1, "%d", serinfo.closing_wait);
data/setserial-2.17/setserial.c:519: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).
	if ((fd = open(device, O_RDWR|O_NONBLOCK)) < 0) {
data/setserial-2.17/setserial.c:675: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).
	if ((fd = open(device, O_RDWR|O_NONBLOCK)) < 0) {
data/setserial-2.17/pcmcia.c:77:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                 while ((sz = read(filedes[0],buffer,50000))) {

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 1210 in approximately 0.07 seconds (18427 lines/second)
Physical Source Lines of Code (SLOC) = 1008
Hits@level = [0] 117 [1]   1 [2]  11 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+] 135 [1+]  18 [2+]  17 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 133.929 [1+] 17.8571 [2+] 16.8651 [3+] 5.95238 [4+] 4.96032 [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.