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/bidiv-1.5/term.h
Examining data/bidiv-1.5/term.c
Examining data/bidiv-1.5/bidiv.c

FINAL RESULTS:

data/bidiv-1.5/bidiv.c:256:11:  [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, "w:lpj"))!=-1){
data/bidiv-1.5/term.c:17:15:  [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.
    col_str = getenv("COLUMNS");
data/bidiv-1.5/bidiv.c:260:10:  [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).
			width=atoi(optarg);
data/bidiv-1.5/bidiv.c:298:11:  [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).
			if((fp=fopen(argv[i],"r"))==NULL){
data/bidiv-1.5/term.c:18:29:  [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).
    if (!col_str || (cols = atoi(col_str)) <= 0 || cols == INT_MAX)
data/bidiv-1.5/bidiv.c:112:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if((c=getc(fp))==EOF)
data/bidiv-1.5/bidiv.c:131:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if((c1=getc(fp))==EOF)

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 341 in approximately 0.02 seconds (18775 lines/second)
Physical Source Lines of Code (SLOC) = 219
Hits@level = [0]   3 [1]   2 [2]   3 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  10 [1+]   7 [2+]   5 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 45.6621 [1+] 31.9635 [2+] 22.8311 [3+] 9.13242 [4+]   0 [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.