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/fntsample-5.3/fntsample.c
Examining data/fntsample-5.3/read_blocks.c
Examining data/fntsample-5.3/unicode_blocks.h

FINAL RESULTS:

data/fntsample-5.3/fntsample.c:909:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fontname, "%s %s", family_name, style_name);
data/fntsample-5.3/fntsample.c:324:7:  [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.
		c = getopt_long(argc, argv, "b:f:o:hd:sglwi:x:t:n:m:ep", longopts, NULL);
data/fntsample-5.3/fntsample.c:1048:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		source_date_epoch = getenv("SOURCE_DATE_EPOCH");
data/fntsample-5.3/fntsample.c:397: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).
			font_index = atoi(optarg);
data/fntsample-5.3/fntsample.c:400:18:  [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).
			other_index = atoi(optarg);
data/fntsample-5.3/fntsample.c:475:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(dest, "page=%d", page);
data/fntsample-5.3/fntsample.c:544: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 buf[17];
data/fntsample-5.3/fntsample.c:619: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 buf[9];
data/fntsample-5.3/fntsample.c:721:5:  [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 buf[9];
data/fntsample-5.3/fntsample.c:1042: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 buffer[25];
data/fntsample-5.3/read_blocks.c:12:21:  [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).
	FILE *input_file = fopen(file_name, "r");
data/fntsample-5.3/read_blocks.c:24: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 block_name[256];
data/fntsample-5.3/fntsample.c:901:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(family_name) + strlen(style_name) + 1/* for space */;
data/fntsample-5.3/fntsample.c:901:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(family_name) + strlen(style_name) + 1/* for space */;

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 1199 in approximately 0.05 seconds (25115 lines/second)
Physical Source Lines of Code (SLOC) = 903
Hits@level = [0]  30 [1]   2 [2]   9 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  44 [1+]  14 [2+]  12 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 48.7265 [1+] 15.5039 [2+] 13.289 [3+] 3.32226 [4+] 1.10742 [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.