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/exfatprogs-1.0.4/include/exfat_ondisk.h
Examining data/exfatprogs-1.0.4/include/libexfat.h
Examining data/exfatprogs-1.0.4/include/list.h
Examining data/exfatprogs-1.0.4/include/version.h
Examining data/exfatprogs-1.0.4/lib/libexfat.c
Examining data/exfatprogs-1.0.4/mkfs/mkfs.h
Examining data/exfatprogs-1.0.4/mkfs/upcase.c
Examining data/exfatprogs-1.0.4/mkfs/mkfs.c
Examining data/exfatprogs-1.0.4/tune/tune.c
Examining data/exfatprogs-1.0.4/fsck/fsck.c
Examining data/exfatprogs-1.0.4/fsck/repair.c
Examining data/exfatprogs-1.0.4/fsck/fsck.h
Examining data/exfatprogs-1.0.4/fsck/repair.h
Examining data/exfatprogs-1.0.4/fsck/de_iter.c

FINAL RESULTS:

data/exfatprogs-1.0.4/fsck/repair.c:108:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(desc, ap);
data/exfatprogs-1.0.4/include/libexfat.h:103:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(dir, fmt, ##__VA_ARGS__);		\
data/exfatprogs-1.0.4/fsck/fsck.c:1432:14:  [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 ((c = getopt_long(argc, argv, "rynpVvh", opts, NULL)) != EOF) {
data/exfatprogs-1.0.4/mkfs/mkfs.c:596:14:  [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 ((c = getopt_long(argc, argv, "n:L:c:b:fVvh", opts, NULL)) != EOF)
data/exfatprogs-1.0.4/tune/tune.c:151:14:  [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 ((c = getopt_long(argc, argv, "L:lVvh", opts, NULL)) != EOF)
data/exfatprogs-1.0.4/fsck/fsck.c:65: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			local_path[PATH_MAX * MB_LEN_MAX + 1];
data/exfatprogs-1.0.4/fsck/fsck.c:332:3:  [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((char *)utf16_path, (char *)ctx->ancestors[i]->name,
data/exfatprogs-1.0.4/fsck/fsck.c:335:3:  [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((char *)utf16_path, &utf16_slash, sizeof(utf16_slash));
data/exfatprogs-1.0.4/fsck/fsck.c:341: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((char *)utf16_path, &utf16_null, sizeof(utf16_null));
data/exfatprogs-1.0.4/fsck/fsck.c:884:3:  [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(node->name +
data/exfatprogs-1.0.4/fsck/fsck.c:1374:9:  [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.
	static char buf[15*4];
data/exfatprogs-1.0.4/fsck/fsck.h:65: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			volume_label[VOLUME_LABEL_BUFFER_SIZE];
data/exfatprogs-1.0.4/fsck/repair.c:62: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 answer[8];
data/exfatprogs-1.0.4/include/libexfat.h:60: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 dev_name[255];
data/exfatprogs-1.0.4/lib/libexfat.c:148: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(ui->dev_name, ui->writeable ? O_RDWR|O_EXCL : O_RDONLY);
data/exfatprogs-1.0.4/lib/libexfat.c:261: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 c_str[MB_LEN_MAX];
data/exfatprogs-1.0.4/lib/libexfat.c:316:3:  [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(out_str+out_len, c_str, c_len);
data/exfatprogs-1.0.4/mkfs/mkfs.c:52: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(pbpb->oem_name, "EXFAT   ", 8);
data/exfatprogs-1.0.4/mkfs/mkfs.c:377: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(ed[0].vol_label, ui->volume_label, ui->volume_label_len);
data/exfatprogs-1.0.4/mkfs/upcase.c:15:23:  [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.
static const unsigned char upcase_table[EXFAT_UPCASE_TABLE_SIZE] = {
data/exfatprogs-1.0.4/tune/tune.c:70: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 volume_label[VOLUME_LABEL_BUFFER_SIZE];
data/exfatprogs-1.0.4/tune/tune.c:116: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(vol.vol_label, volume_label, volume_label_len);
data/exfatprogs-1.0.4/tune/tune.c:142: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 label_input[VOLUME_LABEL_BUFFER_SIZE];

ANALYSIS SUMMARY:

Hits = 23
Lines analyzed = 4555 in approximately 0.19 seconds (24088 lines/second)
Physical Source Lines of Code (SLOC) = 3634
Hits@level = [0]  32 [1]   0 [2]  18 [3]   3 [4]   2 [5]   0
Hits@level+ = [0+]  55 [1+]  23 [2+]  23 [3+]   5 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 15.1348 [1+] 6.32911 [2+] 6.32911 [3+] 1.37589 [4+] 0.550358 [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.