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/memtool-2018.03.0/fileaccess.h
Examining data/memtool-2018.03.0/fileaccpriv.h
Examining data/memtool-2018.03.0/memtool.c
Examining data/memtool-2018.03.0/fileaccess.c
Examining data/memtool-2018.03.0/acc_mmap.c
Examining data/memtool-2018.03.0/acc_mdio.c

FINAL RESULTS:

data/memtool-2018.03.0/acc_mdio.c:60:2:  [4] (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).
	strcpy(ifr.ifr_name, mdio_fd->ifrn_name);
data/memtool-2018.03.0/acc_mdio.c:99:2:  [4] (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).
	strcpy(ifr.ifr_name, mdio_fd->ifrn_name);
data/memtool-2018.03.0/memtool.c:162:14:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				count -= printf(" %016" PRIx64, res);
data/memtool-2018.03.0/memtool.c:168:14:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				count -= printf(" %08" PRIx32, res);
data/memtool-2018.03.0/memtool.c:174:14:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				count -= printf(" %04" PRIx16, res);
data/memtool-2018.03.0/memtool.c:237:16:  [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, "bwlqs:xh")) != -1) {
data/memtool-2018.03.0/memtool.c:346:16:  [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, "bwlqd:h")) != -1) {
data/memtool-2018.03.0/acc_mdio.c:38: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 ifrn_name[IFNAMSIZ];
data/memtool-2018.03.0/acc_mdio.c:166: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(mdio_fd->ifrn_name, spec, delim - spec);
data/memtool-2018.03.0/acc_mmap.c:197: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).
	mmap_fd->fd = open(spec, flags, S_IRUSR | S_IWUSR);
data/memtool-2018.03.0/memtool.c:146: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 linebuf[DISP_LINE_LEN];
data/memtool-2018.03.0/fileaccess.c:41:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return mfd->read(mfd, offset, buf, nbytes, width);
data/memtool-2018.03.0/fileaccpriv.h:16:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t (*read)(struct memtool_fd *handle, off_t offset,

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 1003 in approximately 0.03 seconds (29602 lines/second)
Physical Source Lines of Code (SLOC) = 752
Hits@level = [0]  24 [1]   2 [2]   4 [3]   2 [4]   5 [5]   0
Hits@level+ = [0+]  37 [1+]  13 [2+]  11 [3+]   7 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 49.2021 [1+] 17.2872 [2+] 14.6277 [3+] 9.30851 [4+] 6.64894 [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.