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/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_fastann_random.cpp
Examining data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_flann_random.cpp
Examining data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_libkdtree_random.cpp
Examining data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_nanoflann_random.cpp
Examining data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_fastann_real.cpp
Examining data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_flann_real.cpp
Examining data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_libkdtree_real.cpp
Examining data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_nanoflann_real.cpp
Examining data/nanoflann-1.3.2+ds/examples/KDTreeVectorOfVectorsAdaptor.h
Examining data/nanoflann-1.3.2+ds/examples/SO2_adaptor_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/SO3_adaptor_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/dynamic_pointcloud_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/example_with_pkgconfig/pointcloud_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/matrix_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/pointcloud_adaptor_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/pointcloud_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/pointcloud_kdd_radius.cpp
Examining data/nanoflann-1.3.2+ds/examples/saveload_example.cpp
Examining data/nanoflann-1.3.2+ds/examples/utils.h
Examining data/nanoflann-1.3.2+ds/examples/vector_of_vectors_example.cpp
Examining data/nanoflann-1.3.2+ds/include/nanoflann.hpp
Examining data/nanoflann-1.3.2+ds/perf-tests/flann/test_flann.cpp
Examining data/nanoflann-1.3.2+ds/perf-tests/nanoflann/test_leaf_max_size.cpp
Examining data/nanoflann-1.3.2+ds/perf-tests/nanoflann/test_nanoflann.cpp
Examining data/nanoflann-1.3.2+ds/tests/test_main.cpp

FINAL RESULTS:

data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_fastann_random.cpp:86:9:  [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(atoi(argv[2]));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_flann_random.cpp:86:9:  [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(atoi(argv[2]));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_libkdtree_random.cpp:146: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(atoi(argv[2]));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_nanoflann_random.cpp:130:9:  [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(atoi(argv[2]));
data/nanoflann-1.3.2+ds/examples/SO2_adaptor_example.cpp:78: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/examples/SO3_adaptor_example.cpp:78: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/examples/dynamic_pointcloud_example.cpp:134: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/examples/matrix_example.cpp:129:3:  [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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/examples/pointcloud_adaptor_example.cpp:148: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((unsigned int)time(NULL));
data/nanoflann-1.3.2+ds/examples/pointcloud_example.cpp:91: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/examples/pointcloud_kdd_radius.cpp:107: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/examples/saveload_example.cpp:98: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/examples/vector_of_vectors_example.cpp:96: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/tests/test_main.cpp:426: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/tests/test_main.cpp:441: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/tests/test_main.cpp:456: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/tests/test_main.cpp:471: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(static_cast<unsigned int>(time(nullptr)));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_fastann_random.cpp:86:15:  [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).
        srand(atoi(argv[2]));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_fastann_random.cpp:87:19:  [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).
        maxSize = atoi(argv[1]);
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_flann_random.cpp:86:15:  [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).
        srand(atoi(argv[2]));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_flann_random.cpp:87:19:  [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).
        maxSize = atoi(argv[1]);
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_libkdtree_random.cpp:146:11:  [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).
    srand(atoi(argv[2]));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_libkdtree_random.cpp:147:15:  [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).
    maxSize = atoi(argv[1]);
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_nanoflann_random.cpp:130:15:  [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).
        srand(atoi(argv[2]));
data/nanoflann-1.3.2+ds/benchmarkTool/randomTests/benchmark_nanoflann_random.cpp:131:19:  [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).
        maxSize = atoi(argv[1]);
data/nanoflann-1.3.2+ds/examples/pointcloud_adaptor_example.cpp:156:10:  [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* f=fopen("/proc/self/statm","rt");
data/nanoflann-1.3.2+ds/examples/pointcloud_adaptor_example.cpp:158: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[300];
data/nanoflann-1.3.2+ds/examples/saveload_example.cpp:63:13:  [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 *f = fopen("index.bin", "wb");
data/nanoflann-1.3.2+ds/examples/saveload_example.cpp:76:13:  [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 *f = fopen("index.bin", "rb");
data/nanoflann-1.3.2+ds/examples/utils.h:175:12:  [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* f = fopen("/proc/self/statm","rt");
data/nanoflann-1.3.2+ds/examples/utils.h:177: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[300];
data/nanoflann-1.3.2+ds/perf-tests/nanoflann/test_leaf_max_size.cpp:91:13:  [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 *f = fopen(sFil,"rt");
data/nanoflann-1.3.2+ds/perf-tests/nanoflann/test_leaf_max_size.cpp:95: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 str[300];
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_fastann_real.cpp:42:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ifstream read(file.c_str());
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_fastann_real.cpp:45:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getline(read, temp);
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_fastann_real.cpp:52:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (read >> x >> y >> z >> d) {
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_flann_real.cpp:41:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ifstream read(file.c_str());
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_flann_real.cpp:44:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getline(read, temp);
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_flann_real.cpp:52:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (read >> x >> y >> z >> d) {
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_libkdtree_real.cpp:100:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ifstream read(file.c_str());
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_libkdtree_real.cpp:103:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getline(read, temp);
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_libkdtree_real.cpp:110:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (read >> x >> y >> z >> d) {
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_nanoflann_real.cpp:76:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ifstream read(file.c_str());
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_nanoflann_real.cpp:79:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getline(read, temp);
data/nanoflann-1.3.2+ds/benchmarkTool/realTests/benchmark_nanoflann_real.cpp:86:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (read >> x >> y >> z >> d) {

ANALYSIS SUMMARY:

Hits = 45
Lines analyzed = 5739 in approximately 0.23 seconds (24605 lines/second)
Physical Source Lines of Code (SLOC) = 3341
Hits@level = [0]  10 [1]  12 [2]  16 [3]  17 [4]   0 [5]   0
Hits@level+ = [0+]  55 [1+]  45 [2+]  33 [3+]  17 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 16.4621 [1+] 13.469 [2+] 9.87728 [3+] 5.0883 [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.