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/timbl-6.5/src/Common.cxx
Examining data/timbl-6.5/src/GetOptClass.cxx
Examining data/timbl-6.5/src/IBtree.cxx
Examining data/timbl-6.5/src/IBprocs.cxx
Examining data/timbl-6.5/src/Instance.cxx
Examining data/timbl-6.5/src/MBLClass.cxx
Examining data/timbl-6.5/src/MsgClass.cxx
Examining data/timbl-6.5/src/StringOps.cxx
Examining data/timbl-6.5/src/TimblAPI.cxx
Examining data/timbl-6.5/src/Choppers.cxx
Examining data/timbl-6.5/src/TimblExperiment.cxx
Examining data/timbl-6.5/src/IGExperiment.cxx
Examining data/timbl-6.5/src/Metrics.cxx
Examining data/timbl-6.5/src/Testers.cxx
Examining data/timbl-6.5/src/TRIBLExperiments.cxx
Examining data/timbl-6.5/src/LOOExperiment.cxx
Examining data/timbl-6.5/src/CVExperiment.cxx
Examining data/timbl-6.5/src/Types.cxx
Examining data/timbl-6.5/src/neighborSet.cxx
Examining data/timbl-6.5/src/Statistics.cxx
Examining data/timbl-6.5/src/BestArray.cxx
Examining data/timbl-6.5/src/simpletest.cxx
Examining data/timbl-6.5/src/Timbl.cxx
Examining data/timbl-6.5/include/timbl/Common.h
Examining data/timbl-6.5/include/timbl/GetOptClass.h
Examining data/timbl-6.5/include/timbl/IBtree.h
Examining data/timbl-6.5/include/timbl/Matrices.h
Examining data/timbl-6.5/include/timbl/Instance.h
Examining data/timbl-6.5/include/timbl/MBLClass.h
Examining data/timbl-6.5/include/timbl/MsgClass.h
Examining data/timbl-6.5/include/timbl/BestArray.h
Examining data/timbl-6.5/include/timbl/StringOps.h
Examining data/timbl-6.5/include/timbl/TimblAPI.h
Examining data/timbl-6.5/include/timbl/Options.h
Examining data/timbl-6.5/include/timbl/TimblExperiment.h
Examining data/timbl-6.5/include/timbl/Types.h
Examining data/timbl-6.5/include/timbl/neighborSet.h
Examining data/timbl-6.5/include/timbl/Statistics.h
Examining data/timbl-6.5/include/timbl/Choppers.h
Examining data/timbl-6.5/include/timbl/Testers.h
Examining data/timbl-6.5/include/timbl/Metrics.h
Examining data/timbl-6.5/demos/api_test1.cxx
Examining data/timbl-6.5/demos/api_test2.cxx
Examining data/timbl-6.5/demos/api_test3.cxx
Examining data/timbl-6.5/demos/api_test4.cxx
Examining data/timbl-6.5/demos/api_test5.cxx
Examining data/timbl-6.5/demos/api_test6.cxx
Examining data/timbl-6.5/demos/classify.cxx
Examining data/timbl-6.5/demos/tse.cxx

FINAL RESULTS:

data/timbl-6.5/src/IGExperiment.cxx:45:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand( RandomSeed() );
data/timbl-6.5/src/IGExperiment.cxx:69:4:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	  srand( random_seed );
data/timbl-6.5/src/IGExperiment.cxx:488:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand( RandomSeed() );
data/timbl-6.5/src/LOOExperiment.cxx:65:4:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	  srand( random_seed );
data/timbl-6.5/src/TRIBLExperiments.cxx:53:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand( RandomSeed() );
data/timbl-6.5/src/TRIBLExperiments.cxx:64:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand( RandomSeed() );
data/timbl-6.5/src/TRIBLExperiments.cxx:333:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand( RandomSeed() );
data/timbl-6.5/src/TRIBLExperiments.cxx:384:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand( RandomSeed() );
data/timbl-6.5/src/TimblExperiment.cxx:317:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand( random_seed );
data/timbl-6.5/src/TimblExperiment.cxx:2481:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand( RandomSeed() );
data/timbl-6.5/src/TimblExperiment.cxx:2553:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand( RandomSeed() );
data/timbl-6.5/src/simpletest.cxx:32:27:  [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.
  std::string path = std::getenv( "topsrcdir" );
data/timbl-6.5/demos/classify.cxx:50:12:  [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).
  testfile.open( test_f, ios::in );
data/timbl-6.5/demos/classify.cxx:66:12:  [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).
  testfile.open( test_f, ios::in );
data/timbl-6.5/demos/classify.cxx:85:12:  [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).
  testfile.open( test_f, ios::in );
data/timbl-6.5/demos/classify.cxx:102:12:  [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).
  testfile.open( test_f, ios::in );
data/timbl-6.5/demos/tse.cxx:441:21:  [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 ( (test_file.open( argv[1], ios::in ), !test_file.good() ) ){
data/timbl-6.5/src/Instance.cxx:816: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 dumname[80];
data/timbl-6.5/src/Instance.cxx:819:7:  [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( dumname, "dum%d", i );
data/timbl-6.5/src/TimblExperiment.cxx:1399:18:  [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).
      testStream.open( InFileName, ios::in);
data/timbl-6.5/src/TimblExperiment.cxx:1409:12:  [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).
	outStream.open( OutFileName, ios::app );
data/timbl-6.5/src/TimblExperiment.cxx:1419:16:  [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).
	    outStream.open( OutFileName, ios::out | ios::trunc );
data/timbl-6.5/demos/tse.cxx:45:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
using std::equal;
data/timbl-6.5/include/timbl/IBtree.h:164:31:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    std::vector<unsigned int> mismatch;
data/timbl-6.5/src/IBtree.cxx:1309:10:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if ( mismatch.size() == 0 ){
data/timbl-6.5/src/IBtree.cxx:1310:7:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      mismatch.resize(Depth+1, 0);
data/timbl-6.5/src/IBtree.cxx:1324:42:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	hlp = IBtree::add_feat_val( Inst.FV[i], mismatch[i], pnt, ibCount );
data/timbl-6.5/src/IBtree.cxx:1384:14:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if ( ib->mismatch.size() > 0 ){
data/timbl-6.5/src/IBtree.cxx:1385:12:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if ( mismatch.size() == 0 ){
data/timbl-6.5/src/IBtree.cxx:1386:2:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch.resize( ib->mismatch.size(), 0 );
data/timbl-6.5/src/IBtree.cxx:1386:23:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch.resize( ib->mismatch.size(), 0 );
data/timbl-6.5/src/IBtree.cxx:1388:37:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      for ( unsigned int i = 0; i < mismatch.size(); ++i ){
data/timbl-6.5/src/IBtree.cxx:1389:2:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch[i] += ib->mismatch[i];
data/timbl-6.5/src/IBtree.cxx:1389:21:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch[i] += ib->mismatch[i];
data/timbl-6.5/src/IBtree.cxx:1473:14:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if ( ib->mismatch.size() > 0 ){
data/timbl-6.5/src/IBtree.cxx:1474:12:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if ( mismatch.size() == 0 ){
data/timbl-6.5/src/IBtree.cxx:1475:2:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch.resize( ib->mismatch.size(), 0 );
data/timbl-6.5/src/IBtree.cxx:1475:23:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch.resize( ib->mismatch.size(), 0 );
data/timbl-6.5/src/IBtree.cxx:1477:37:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      for ( unsigned int i = 0; i < mismatch.size(); ++i ){
data/timbl-6.5/src/IBtree.cxx:1478:2:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch[i] += ib->mismatch[i];
data/timbl-6.5/src/IBtree.cxx:1478:21:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	mismatch[i] += ib->mismatch[i];
data/timbl-6.5/src/IGExperiment.cxx:340:53:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      cerr << "final mismatches: " << InstanceBase->mismatch << endl;
data/timbl-6.5/src/TimblExperiment.cxx:636:53:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      cerr << "final mismatches: " << InstanceBase->mismatch << endl;
data/timbl-6.5/src/TimblExperiment.cxx:1243:48:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	  cerr << "IB2 mismatches: " << InstanceBase->mismatch << endl;

ANALYSIS SUMMARY:

Hits = 44
Lines analyzed = 20589 in approximately 0.45 seconds (46226 lines/second)
Physical Source Lines of Code (SLOC) = 17470
Hits@level = [0]   1 [1]  22 [2]  10 [3]  12 [4]   0 [5]   0
Hits@level+ = [0+]  45 [1+]  44 [2+]  22 [3+]  12 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 2.57584 [1+] 2.5186 [2+] 1.2593 [3+] 0.686892 [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.