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/tcs-1/big5.c
Examining data/tcs-1/big5.h
Examining data/tcs-1/conv.h
Examining data/tcs-1/conv_big5.c
Examining data/tcs-1/conv_gb.c
Examining data/tcs-1/conv_ksc.c
Examining data/tcs-1/gb.c
Examining data/tcs-1/gb.h
Examining data/tcs-1/hdr.h
Parsing failed to find end of parameter list in (stderr,
#define	USED(x)		/* in plan 9, USED(x) tells the compiler to treat x as used */
#define	EXIT(n,s)	exit(n)
#endif

Examining data/tcs-1/jis.h
Examining data/tcs-1/ksc.c
Examining data/tcs-1/ksc.h
Examining data/tcs-1/kuten208.c
Examining data/tcs-1/kuten208.h
Examining data/tcs-1/kuten212.c
Examining data/tcs-1/kuten212.h
Examining data/tcs-1/plan9.h
Examining data/tcs-1/utf.c
Examining data/tcs-1/version.c
Examining data/tcs-1/conv_jis.c
Examining data/tcs-1/cyrillic.h
Examining data/tcs-1/tcs.c

FINAL RESULTS:

data/tcs-1/hdr.h:43:14:  [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.
#define	EPR		fprintf(stderr,
data/tcs-1/hdr.h:33:8:  [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.
extern char obuf[UTFmax*N];	/* maximum bloat from N runes */
data/tcs-1/tcs.c:30:1:  [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 obuf[UTFmax*N];	/* maximum bloat from N runes */
data/tcs-1/tcs.c:77:13:  [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).
			if((fd = open(*argv, 0)) < 0){
data/tcs-1/tcs.c:80:13:  [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).
			if((fd = open(*argv, OREAD)) < 0){
data/tcs-1/utf.c:173: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 str[UTFmax];	/* MB_LEN_MAX really */
data/tcs-1/utf.c:204: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 str[UTFmax];	/* MB_LEN_MAX really */
data/tcs-1/conv_big5.c:98:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((n = read(fd, ibuf, sizeof ibuf)) > 0){
data/tcs-1/conv_gb.c:76:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((n = read(fd, ibuf, sizeof ibuf)) > 0){
data/tcs-1/conv_jis.c:360:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((n = read(fd, ibuf, sizeof ibuf)) > 0){
data/tcs-1/conv_ksc.c:96:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((n = read(fd, ibuf, sizeof ibuf)) > 0){
data/tcs-1/tcs.c:176:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if(read(fd, (char *)buf, 2) != 2)
data/tcs-1/tcs.c:190:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((n = read(fd, (char *)buf, 2*N)) > 0){
data/tcs-1/tcs.c:237:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((n = read(fd, (char *)buf, N)) > 0){
data/tcs-1/utf.c:179:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(fp);
data/tcs-1/utf.c:208:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(fp);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 8845 in approximately 0.52 seconds (16941 lines/second)
Physical Source Lines of Code (SLOC) = 8493
Hits@level = [0]   0 [1]   9 [2]   6 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  16 [1+]  16 [2+]   7 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 1.8839 [1+] 1.8839 [2+] 0.824208 [3+] 0.117744 [4+] 0.117744 [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.