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/spi-tools-0.8.4/src/spi-config.c
Examining data/spi-tools-0.8.4/src/spi-pipe.c

FINAL RESULTS:

data/spi-tools-0.8.4/src/spi-config.c:95:16:  [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.
	while ((opt = getopt_long(argc, argv, "d:qhvwm:l:b:s:r:", options, &long_index)) >= 0) {
data/spi-tools-0.8.4/src/spi-pipe.c:83:16:  [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.
	while ((opt = getopt_long(argc, argv, "d:s:b:n:rhv", options, &long_index)) >= 0) {
data/spi-tools-0.8.4/src/spi-config.c:169:7:  [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(device, O_RDONLY);
data/spi-tools-0.8.4/src/spi-pipe.c:141:7:  [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(device, O_RDONLY);
data/spi-tools-0.8.4/src/spi-pipe.c:161:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			nb = read(STDIN_FILENO, & (tx_buffer[offset]), blocksize - offset);

ANALYSIS SUMMARY:

Hits = 5
Lines analyzed = 443 in approximately 0.03 seconds (12751 lines/second)
Physical Source Lines of Code (SLOC) = 355
Hits@level = [0]  50 [1]   1 [2]   2 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  55 [1+]   5 [2+]   4 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 154.93 [1+] 14.0845 [2+] 11.2676 [3+] 5.6338 [4+]   0 [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.