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/sopt-3.0.1/cmake_files/using.cc Examining data/sopt-3.0.1/cpp/benchmarks/conjugate_gradient.cc Examining data/sopt-3.0.1/cpp/benchmarks/l1_proximal.cc Examining data/sopt-3.0.1/cpp/benchmarks/wavelets.cc Examining data/sopt-3.0.1/cpp/examples/conjugate_gradient.cc Examining data/sopt-3.0.1/cpp/examples/forward_backward/inpainting.cc Examining data/sopt-3.0.1/cpp/examples/forward_backward/inpainting_credible_interval.cc Examining data/sopt-3.0.1/cpp/examples/forward_backward/inpainting_joint_map.cc Examining data/sopt-3.0.1/cpp/examples/l1_norm.cc Examining data/sopt-3.0.1/cpp/examples/l1_proximal.cc Examining data/sopt-3.0.1/cpp/examples/positive_quadrant_projection.cc Examining data/sopt-3.0.1/cpp/examples/power_method.cc Examining data/sopt-3.0.1/cpp/examples/primal_dual/inpainting.cc Examining data/sopt-3.0.1/cpp/examples/primal_dual/reweighted.cc Examining data/sopt-3.0.1/cpp/examples/proximal_admm/euclidian_norm.cc Examining data/sopt-3.0.1/cpp/examples/proximal_admm/inpainting.cc Examining data/sopt-3.0.1/cpp/examples/proximal_admm/reweighted.cc Examining data/sopt-3.0.1/cpp/examples/sara.cc Examining data/sopt-3.0.1/cpp/examples/sdmm/euclidian_norm.cc Examining data/sopt-3.0.1/cpp/examples/sdmm/inpainting.cc Examining data/sopt-3.0.1/cpp/examples/sdmm/reweighted.cc Examining data/sopt-3.0.1/cpp/examples/soft_threshhold.cc Examining data/sopt-3.0.1/cpp/examples/wavelets.cc Examining data/sopt-3.0.1/cpp/regressions/l1_proximal.cc Examining data/sopt-3.0.1/cpp/regressions/padmm_inpainting.cc Examining data/sopt-3.0.1/cpp/regressions/reweighted_sdmm.cc Examining data/sopt-3.0.1/cpp/regressions/sdmm_inpainting.cc Examining data/sopt-3.0.1/cpp/sopt/bisection_method.h Examining data/sopt-3.0.1/cpp/sopt/chained_operators.h Examining data/sopt-3.0.1/cpp/sopt/config.in.h Examining data/sopt-3.0.1/cpp/sopt/conjugate_gradient.h Examining data/sopt-3.0.1/cpp/sopt/credible_region.h Examining data/sopt-3.0.1/cpp/sopt/exception.h Examining data/sopt-3.0.1/cpp/sopt/forward_backward.h Examining data/sopt-3.0.1/cpp/sopt/imaging_forward_backward.h Examining data/sopt-3.0.1/cpp/sopt/imaging_padmm.h Examining data/sopt-3.0.1/cpp/sopt/joint_map.h Examining data/sopt-3.0.1/cpp/sopt/l1_proximal.h Examining data/sopt-3.0.1/cpp/sopt/linear_transform.h Examining data/sopt-3.0.1/cpp/sopt/logging.disabled.h Examining data/sopt-3.0.1/cpp/sopt/logging.h Examining data/sopt-3.0.1/cpp/sopt/maths.h Examining data/sopt-3.0.1/cpp/sopt/mpi/communicator.cc Examining data/sopt-3.0.1/cpp/sopt/mpi/communicator.h Examining data/sopt-3.0.1/cpp/sopt/mpi/registered_types.cc Examining data/sopt-3.0.1/cpp/sopt/mpi/registered_types.h Examining data/sopt-3.0.1/cpp/sopt/mpi/session.cc Examining data/sopt-3.0.1/cpp/sopt/mpi/session.h Examining data/sopt-3.0.1/cpp/sopt/mpi/utilities.h Examining data/sopt-3.0.1/cpp/sopt/objective_functions.h Examining data/sopt-3.0.1/cpp/sopt/padmm.h Examining data/sopt-3.0.1/cpp/sopt/positive_quadrant.h Examining data/sopt-3.0.1/cpp/sopt/power_method.h Examining data/sopt-3.0.1/cpp/sopt/primal_dual.h Examining data/sopt-3.0.1/cpp/sopt/proximal.h Examining data/sopt-3.0.1/cpp/sopt/proximal_expression.h Examining data/sopt-3.0.1/cpp/sopt/real_type.h Examining data/sopt-3.0.1/cpp/sopt/relative_variation.h Examining data/sopt-3.0.1/cpp/sopt/reweighted.h Examining data/sopt-3.0.1/cpp/sopt/sampling.cc Examining data/sopt-3.0.1/cpp/sopt/sampling.h Examining data/sopt-3.0.1/cpp/sopt/sdmm.h Examining data/sopt-3.0.1/cpp/sopt/types.h Examining data/sopt-3.0.1/cpp/sopt/utilities.cc Examining data/sopt-3.0.1/cpp/sopt/utilities.h Examining data/sopt-3.0.1/cpp/sopt/wavelets.h Examining data/sopt-3.0.1/cpp/sopt/wavelets/direct.h Examining data/sopt-3.0.1/cpp/sopt/wavelets/indirect.h Examining data/sopt-3.0.1/cpp/sopt/wavelets/innards.impl.h Examining data/sopt-3.0.1/cpp/sopt/wavelets/sara.cc Examining data/sopt-3.0.1/cpp/sopt/wavelets/sara.h Examining data/sopt-3.0.1/cpp/sopt/wavelets/wavelet_data.cc Examining data/sopt-3.0.1/cpp/sopt/wavelets/wavelet_data.h Examining data/sopt-3.0.1/cpp/sopt/wavelets/wavelets.cc Examining data/sopt-3.0.1/cpp/sopt/wavelets/wavelets.h Examining data/sopt-3.0.1/cpp/sopt/wrapper.h Examining data/sopt-3.0.1/cpp/sopt/logging.enabled.h Examining data/sopt-3.0.1/cpp/tests/bisection_method.cc Examining data/sopt-3.0.1/cpp/tests/chained_operators.cc Examining data/sopt-3.0.1/cpp/tests/common_catch_main.cc Examining data/sopt-3.0.1/cpp/tests/common_mpi_catch_main.cc Examining data/sopt-3.0.1/cpp/tests/communicator.cc Examining data/sopt-3.0.1/cpp/tests/conjugate_gradient.cc Examining data/sopt-3.0.1/cpp/tests/forward_backward.cc Examining data/sopt-3.0.1/cpp/tests/linear_transform.cc Examining data/sopt-3.0.1/cpp/tests/maths.cc Examining data/sopt-3.0.1/cpp/tests/mpi_proximals.cc Examining data/sopt-3.0.1/cpp/tests/mpi_session.cc Examining data/sopt-3.0.1/cpp/tests/mpi_wavelets.cc Examining data/sopt-3.0.1/cpp/tests/padmm.cc Examining data/sopt-3.0.1/cpp/tests/padmm_warm_start.cc Examining data/sopt-3.0.1/cpp/tests/power_method.cc Examining data/sopt-3.0.1/cpp/tests/reweighted.cc Examining data/sopt-3.0.1/cpp/tests/sara.cc Examining data/sopt-3.0.1/cpp/tests/sdmm.cc Examining data/sopt-3.0.1/cpp/tests/sdmm_warm_start.cc Examining data/sopt-3.0.1/cpp/tests/serial_vs_parallel_padmm.cc Examining data/sopt-3.0.1/cpp/tests/wavelets.cc Examining data/sopt-3.0.1/cpp/tests/wrapper.cc Examining data/sopt-3.0.1/cpp/tests/credible_region.cc Examining data/sopt-3.0.1/cpp/tests/primal_dual.cc Examining data/sopt-3.0.1/cpp/tests/proximal.cc Examining data/sopt-3.0.1/cpp/tools_for_tests/cdata.h Examining data/sopt-3.0.1/cpp/tools_for_tests/copy_tiff.cc Examining data/sopt-3.0.1/cpp/tools_for_tests/directories.in.h Examining data/sopt-3.0.1/cpp/tools_for_tests/inpainting.h Examining data/sopt-3.0.1/cpp/tools_for_tests/tiffwrappers.cc Examining data/sopt-3.0.1/cpp/tools_for_tests/tiffwrappers.h FINAL RESULTS: data/sopt-3.0.1/cpp/examples/forward_backward/inpainting.cc:48:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/forward_backward/inpainting_credible_interval.cc:49:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/forward_backward/inpainting_joint_map.cc:49:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/primal_dual/inpainting.cc:54:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/primal_dual/reweighted.cc:54:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/proximal_admm/inpainting.cc:48:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/proximal_admm/reweighted.cc:51:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/sdmm/inpainting.cc:48:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/examples/sdmm/reweighted.cc:52:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/tests/primal_dual.cc:90:8: [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. std::srand((unsigned int)seed); data/sopt-3.0.1/cpp/tests/communicator.cc:137:18: [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. CHECK(std::equal(v.begin(), v.end(), v0.begin())); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 14109 in approximately 0.51 seconds (27933 lines/second) Physical Source Lines of Code (SLOC) = 11137 Hits@level = [0] 1 [1] 1 [2] 0 [3] 10 [4] 0 [5] 0 Hits@level+ = [0+] 12 [1+] 11 [2+] 10 [3+] 10 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.07749 [1+] 0.987699 [2+] 0.897908 [3+] 0.897908 [4+] 0 [5+] 0 Dot directories skipped = 2 (--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.