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/recoverdm-0.20/error.h
Examining data/recoverdm-0.20/io.h
Examining data/recoverdm-0.20/utils.h
Examining data/recoverdm-0.20/dev.h
Examining data/recoverdm-0.20/io.c
Examining data/recoverdm-0.20/utils.c
Examining data/recoverdm-0.20/gen.h
Examining data/recoverdm-0.20/error.c
Examining data/recoverdm-0.20/recoverdm.c
Examining data/recoverdm-0.20/mergebad.c
Examining data/recoverdm-0.20/dev.c

FINAL RESULTS:

data/recoverdm-0.20/error.c:15:8:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	(void)vfprintf(stderr, format, ap);
data/recoverdm-0.20/recoverdm.c:230:13:  [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, "i:o:l:t:p:n:s:r:b:Vh")) != -1)
data/recoverdm-0.20/dev.c:175: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(whereto, &pframe[12 + 4], 2048);
data/recoverdm-0.20/mergebad.c:174:7:  [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).
	fh = fopen(filename, "rb");
data/recoverdm-0.20/mergebad.c:350: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).
		fh_map_file = fopen(map_file, "w");
data/recoverdm-0.20/recoverdm.c:74: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 selection[block_size];
data/recoverdm-0.20/recoverdm.c:194:4:  [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(whereto, dummy, block_size);
data/recoverdm-0.20/recoverdm.c:235:15:  [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).
			dev_type = atoi(optarg);
data/recoverdm-0.20/recoverdm.c:256:16:  [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).
			n_retries = atoi(optarg);
data/recoverdm-0.20/recoverdm.c:259:17:  [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).
			skip_value = atoi(optarg);
data/recoverdm-0.20/recoverdm.c:262:15:  [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).
			cd_speed = atoi(optarg);
data/recoverdm-0.20/recoverdm.c:265:23:  [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).
			n_raw_cd_retries = atoi(optarg);
data/recoverdm-0.20/recoverdm.c:333:14:  [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).
		dsecfile = fopen(file_list, "w");
data/recoverdm-0.20/recoverdm.c:454:6:  [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 raw_buffer[2048];
data/recoverdm-0.20/utils.c:47: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[512];
data/recoverdm-0.20/io.c:23:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rc = read(fd, whereto, len);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 1493 in approximately 0.06 seconds (25997 lines/second)
Physical Source Lines of Code (SLOC) = 1176
Hits@level = [0] 100 [1]   1 [2]  13 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+] 116 [1+]  16 [2+]  15 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 98.6395 [1+] 13.6054 [2+] 12.7551 [3+] 1.70068 [4+] 0.85034 [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.