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/s3switch-0.1/s3switch.c
Examining data/s3switch-0.1/lrmi.c
Examining data/s3switch-0.1/lrmi.h

FINAL RESULTS:

data/s3switch-0.1/lrmi.c:84: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(name, O_RDONLY);
data/s3switch-0.1/lrmi.c:108: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(name, (flags & MAP_SHARED) ? O_RDWR : O_RDONLY);
data/s3switch-0.1/lrmi.c:374:13:  [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.
	((unsigned char *)m)[0] = 0xcd; 	/* int opcode */
data/s3switch-0.1/lrmi.c:375:13:  [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.
	((unsigned char *)m)[1] = RETURN_TO_32_INT;
data/s3switch-0.1/lrmi.c:854: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(&CONTEXT_REGS, sc, sizeof(*sc));
data/s3switch-0.1/lrmi.c:893: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(sc, &CONTEXT_REGS, sizeof(*sc));
data/s3switch-0.1/lrmi.c:902: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(&CONTEXT_REGS, sc, sizeof(*sc));
data/s3switch-0.1/lrmi.c:935: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(sc, &CONTEXT_REGS, sizeof(*sc));
data/s3switch-0.1/lrmi.c:91:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, p, n) != n) {

ANALYSIS SUMMARY:

Hits = 9
Lines analyzed = 1664 in approximately 0.04 seconds (38536 lines/second)
Physical Source Lines of Code (SLOC) = 1242
Hits@level = [0]  38 [1]   1 [2]   8 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  47 [1+]   9 [2+]   8 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 37.8422 [1+] 7.24638 [2+] 6.44122 [3+]   0 [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.