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/hera-0~git20200602+dfsg/bottleneck/example/bottleneck_dist.cpp
Examining data/hera-0~git20200602+dfsg/bottleneck/include/basic_defs_bt.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/bottleneck.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/bottleneck_detail.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/bottleneck_detail.hpp
Examining data/hera-0~git20200602+dfsg/bottleneck/include/bound_match.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/bound_match.hpp
Examining data/hera-0~git20200602+dfsg/bottleneck/include/def_debug_bt.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/diagram_reader.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/diagram_traits.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/dnn/geometry/euclidean-fixed.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/dnn/local/kd-tree.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/dnn/local/kd-tree.hpp
Examining data/hera-0~git20200602+dfsg/bottleneck/include/dnn/local/search-functors.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/dnn/parallel/tbb.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/dnn/parallel/utils.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/dnn/utils.h
Examining data/hera-0~git20200602+dfsg/bottleneck/include/neighb_oracle.h
Examining data/hera-0~git20200602+dfsg/bottleneck/tests/test_hera_bottleneck.cpp
Examining data/hera-0~git20200602+dfsg/bottleneck/tests/tests_main.cpp
Examining data/hera-0~git20200602+dfsg/matching/example/matching_dist.cpp
Examining data/hera-0~git20200602+dfsg/matching/example/module_example.cpp
Examining data/hera-0~git20200602+dfsg/matching/include/bifiltration.h
Examining data/hera-0~git20200602+dfsg/matching/include/bifiltration.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/box.h
Examining data/hera-0~git20200602+dfsg/matching/include/box.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/cell_with_value.h
Examining data/hera-0~git20200602+dfsg/matching/include/cell_with_value.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/common_defs.h
Examining data/hera-0~git20200602+dfsg/matching/include/common_util.h
Examining data/hera-0~git20200602+dfsg/matching/include/common_util.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/dual_box.h
Examining data/hera-0~git20200602+dfsg/matching/include/dual_box.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/dual_point.h
Examining data/hera-0~git20200602+dfsg/matching/include/dual_point.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/matching_distance.h
Examining data/hera-0~git20200602+dfsg/matching/include/matching_distance.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/opts/opts.h
Examining data/hera-0~git20200602+dfsg/matching/include/persistence_module.h
Examining data/hera-0~git20200602+dfsg/matching/include/persistence_module.hpp
Examining data/hera-0~git20200602+dfsg/matching/include/simplex.h
Examining data/hera-0~git20200602+dfsg/matching/include/simplex.hpp
Examining data/hera-0~git20200602+dfsg/matching/tests/test_bifiltration.cpp
Examining data/hera-0~git20200602+dfsg/matching/tests/test_common.cpp
Examining data/hera-0~git20200602+dfsg/matching/tests/test_matching_distance.cpp
Examining data/hera-0~git20200602+dfsg/matching/tests/test_module.cpp
Examining data/hera-0~git20200602+dfsg/matching/tests/tests_main.cpp
Examining data/hera-0~git20200602+dfsg/wasserstein/example/wasserstein_dist.cpp
Examining data/hera-0~git20200602+dfsg/wasserstein/example/wasserstein_dist_dipha.cpp
Examining data/hera-0~git20200602+dfsg/wasserstein/example/wasserstein_dist_point_cloud.cpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_base.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_base.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_kdtree_pure_geom.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_kdtree_pure_geom.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_kdtree_restricted.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_kdtree_restricted.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_kdtree_single_diag.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_kdtree_single_diag.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_lazy_heap.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_lazy_heap.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_stupid_sparse_restricted.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_oracle_stupid_sparse_restricted.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_fr.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_fr.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_gs.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_gs.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_gs_single_diag.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_gs_single_diag.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_jac.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/auction_runner_jac.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/basic_defs_ws.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/basic_defs_ws.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/def_debug_ws.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/diagonal_heap.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/diagram_reader.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-dynamic.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-fixed.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/local/kd-tree.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/local/kd-tree.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/local/search-functors.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/parallel/tbb.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/parallel/utils.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/dnn/utils.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/hera_infinity.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/opts/opts.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/wasserstein.h
Examining data/hera-0~git20200602+dfsg/wasserstein/include/wasserstein_pure_geom.hpp
Examining data/hera-0~git20200602+dfsg/wasserstein/tests/tests_reader.h
Examining data/hera-0~git20200602+dfsg/wasserstein/tests/test_hera_wasserstein.cpp
Examining data/hera-0~git20200602+dfsg/wasserstein/tests/test_hera_wasserstein_pure_geom.cpp
Examining data/hera-0~git20200602+dfsg/wasserstein/tests/tests_main.cpp

FINAL RESULTS:

data/hera-0~git20200602+dfsg/bottleneck/include/dnn/geometry/euclidean-fixed.h:73:51:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            friend  class   boost::serialization::access;
data/hera-0~git20200602+dfsg/bottleneck/include/dnn/geometry/euclidean-fixed.h:134:51:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            friend  class   boost::serialization::access;
data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-dynamic.h:68:47:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        friend  class   boost::serialization::access;
data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-dynamic.h:149:47:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        friend  class   boost::serialization::access;
data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-fixed.h:96:51:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            friend  class   boost::serialization::access;
data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-fixed.h:162:51:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            friend  class   boost::serialization::access;
data/hera-0~git20200602+dfsg/bottleneck/tests/test_hera_bottleneck.cpp:552:7:  [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).
    f.open(file_name);
data/hera-0~git20200602+dfsg/wasserstein/example/wasserstein_dist_dipha.cpp:112:50:  [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).
    params.max_bids_per_round = ( 10 <= argc ) ? atoi(argv[9]) : 0;
data/hera-0~git20200602+dfsg/wasserstein/example/wasserstein_dist_point_cloud.cpp:155:49:  [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).
    params.max_bids_per_round = ( 9 <= argc ) ? atoi(argv[8]) : 0;
data/hera-0~git20200602+dfsg/wasserstein/include/diagram_reader.h:210:10:  [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).
    file.open(fname, std::ios::in | std::ios::binary);
data/hera-0~git20200602+dfsg/wasserstein/tests/test_hera_wasserstein.cpp:135:11:  [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).
        f.open(file_name);
data/hera-0~git20200602+dfsg/wasserstein/tests/test_hera_wasserstein.cpp:158:11:  [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).
        f.open(file_name);
data/hera-0~git20200602+dfsg/wasserstein/include/basic_defs_ws.hpp:213:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    s.read(reinterpret_cast<char *>(&result), sizeof(T));
data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-dynamic.h:130:87:  [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.
    bool            eq(PointType p1, PointType p2) const                { return std::equal((Real*) p1.p, ((Real*) p1.p) + dimension(), (Real*) p2.p); }
data/hera-0~git20200602+dfsg/wasserstein/include/dnn/geometry/euclidean-dynamic.h:189:21:  [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.
        bool        equal(const iterator& other) const              { return p_ == other.p_; }

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 21405 in approximately 0.73 seconds (29376 lines/second)
Physical Source Lines of Code (SLOC) = 15108
Hits@level = [0]   0 [1]   3 [2]   6 [3]   0 [4]   6 [5]   0
Hits@level+ = [0+]  15 [1+]  15 [2+]  12 [3+]   6 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 0.992851 [1+] 0.992851 [2+] 0.794281 [3+] 0.397141 [4+] 0.397141 [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.