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/mpfi-1.5.3+ds/src/abs.c Examining data/mpfi-1.5.3+ds/src/acos.c Examining data/mpfi-1.5.3+ds/src/acosh.c Examining data/mpfi-1.5.3+ds/src/add.c Examining data/mpfi-1.5.3+ds/src/add_d.c Examining data/mpfi-1.5.3+ds/src/add_fr.c Examining data/mpfi-1.5.3+ds/src/add_q.c Examining data/mpfi-1.5.3+ds/src/add_si.c Examining data/mpfi-1.5.3+ds/src/add_ui.c Examining data/mpfi-1.5.3+ds/src/add_z.c Examining data/mpfi-1.5.3+ds/src/alea.c Examining data/mpfi-1.5.3+ds/src/asin.c Examining data/mpfi-1.5.3+ds/src/asinh.c Examining data/mpfi-1.5.3+ds/src/atan.c Examining data/mpfi-1.5.3+ds/src/atan2.c Examining data/mpfi-1.5.3+ds/src/atanh.c Examining data/mpfi-1.5.3+ds/src/bisect.c Examining data/mpfi-1.5.3+ds/src/blow.c Examining data/mpfi-1.5.3+ds/src/cbrt.c Examining data/mpfi-1.5.3+ds/src/clear.c Examining data/mpfi-1.5.3+ds/src/cmp.c Examining data/mpfi-1.5.3+ds/src/cmp_sym_pi.c Examining data/mpfi-1.5.3+ds/src/constants.c Examining data/mpfi-1.5.3+ds/src/cos.c Examining data/mpfi-1.5.3+ds/src/cosh.c Examining data/mpfi-1.5.3+ds/src/cot.c Examining data/mpfi-1.5.3+ds/src/coth.c Examining data/mpfi-1.5.3+ds/src/csc.c Examining data/mpfi-1.5.3+ds/src/csch.c Examining data/mpfi-1.5.3+ds/src/d_div.c Examining data/mpfi-1.5.3+ds/src/d_sub.c Examining data/mpfi-1.5.3+ds/src/diam.c Examining data/mpfi-1.5.3+ds/src/div.c Examining data/mpfi-1.5.3+ds/src/div_2exp.c Examining data/mpfi-1.5.3+ds/src/div_2si.c Examining data/mpfi-1.5.3+ds/src/div_2ui.c Examining data/mpfi-1.5.3+ds/src/div_d.c Examining data/mpfi-1.5.3+ds/src/div_fr.c Examining data/mpfi-1.5.3+ds/src/div_q.c Examining data/mpfi-1.5.3+ds/src/div_si.c Examining data/mpfi-1.5.3+ds/src/div_ui.c Examining data/mpfi-1.5.3+ds/src/div_z.c Examining data/mpfi-1.5.3+ds/src/error.c Examining data/mpfi-1.5.3+ds/src/exp.c Examining data/mpfi-1.5.3+ds/src/exp2.c Examining data/mpfi-1.5.3+ds/src/expm1.c Examining data/mpfi-1.5.3+ds/src/fr_div.c Examining data/mpfi-1.5.3+ds/src/fr_sub.c Examining data/mpfi-1.5.3+ds/src/get_d.c Examining data/mpfi-1.5.3+ds/src/get_endpoints.c Examining data/mpfi-1.5.3+ds/src/get_fr.c Examining data/mpfi-1.5.3+ds/src/get_prec.c Examining data/mpfi-1.5.3+ds/src/get_version.c Examining data/mpfi-1.5.3+ds/src/has_zero.c Examining data/mpfi-1.5.3+ds/src/hypot.c Examining data/mpfi-1.5.3+ds/src/increase.c Examining data/mpfi-1.5.3+ds/src/init.c Examining data/mpfi-1.5.3+ds/src/inp_str.c Examining data/mpfi-1.5.3+ds/src/intersect.c Examining data/mpfi-1.5.3+ds/src/interv_d.c Examining data/mpfi-1.5.3+ds/src/interv_fr.c Examining data/mpfi-1.5.3+ds/src/interv_q.c Examining data/mpfi-1.5.3+ds/src/interv_si.c Examining data/mpfi-1.5.3+ds/src/interv_ui.c Examining data/mpfi-1.5.3+ds/src/interv_z.c Examining data/mpfi-1.5.3+ds/src/inv.c Examining data/mpfi-1.5.3+ds/src/is_empty.c Examining data/mpfi-1.5.3+ds/src/is_inside.c Examining data/mpfi-1.5.3+ds/src/log.c Examining data/mpfi-1.5.3+ds/src/log10.c Examining data/mpfi-1.5.3+ds/src/log1p.c Examining data/mpfi-1.5.3+ds/src/log2.c Examining data/mpfi-1.5.3+ds/src/mag.c Examining data/mpfi-1.5.3+ds/src/mid.c Examining data/mpfi-1.5.3+ds/src/mig.c Examining data/mpfi-1.5.3+ds/src/mpfi-impl.h Examining data/mpfi-1.5.3+ds/src/mpfi.h Examining data/mpfi-1.5.3+ds/src/mpfi_io.h Examining data/mpfi-1.5.3+ds/src/mul.c Examining data/mpfi-1.5.3+ds/src/mul_2exp.c Examining data/mpfi-1.5.3+ds/src/mul_2si.c Examining data/mpfi-1.5.3+ds/src/mul_2ui.c Examining data/mpfi-1.5.3+ds/src/mul_d.c Examining data/mpfi-1.5.3+ds/src/mul_fr.c Examining data/mpfi-1.5.3+ds/src/mul_q.c Examining data/mpfi-1.5.3+ds/src/mul_si.c Examining data/mpfi-1.5.3+ds/src/mul_ui.c Examining data/mpfi-1.5.3+ds/src/mul_z.c Examining data/mpfi-1.5.3+ds/src/neg.c Examining data/mpfi-1.5.3+ds/src/out_str.c Examining data/mpfi-1.5.3+ds/src/predicates.c Examining data/mpfi-1.5.3+ds/src/print_binary.c Examining data/mpfi-1.5.3+ds/src/put.c Examining data/mpfi-1.5.3+ds/src/put_d.c Examining data/mpfi-1.5.3+ds/src/put_fr.c Examining data/mpfi-1.5.3+ds/src/put_q.c Examining data/mpfi-1.5.3+ds/src/put_si.c Examining data/mpfi-1.5.3+ds/src/put_ui.c Examining data/mpfi-1.5.3+ds/src/put_z.c Examining data/mpfi-1.5.3+ds/src/q_div.c Examining data/mpfi-1.5.3+ds/src/q_sub.c Examining data/mpfi-1.5.3+ds/src/quadrant.c Examining data/mpfi-1.5.3+ds/src/revert_if_needed.c Examining data/mpfi-1.5.3+ds/src/round_prec.c Examining data/mpfi-1.5.3+ds/src/sec.c Examining data/mpfi-1.5.3+ds/src/sech.c Examining data/mpfi-1.5.3+ds/src/set.c Examining data/mpfi-1.5.3+ds/src/set_d.c Examining data/mpfi-1.5.3+ds/src/set_fr.c Examining data/mpfi-1.5.3+ds/src/set_prec.c Examining data/mpfi-1.5.3+ds/src/set_q.c Examining data/mpfi-1.5.3+ds/src/set_si.c Examining data/mpfi-1.5.3+ds/src/set_str.c Examining data/mpfi-1.5.3+ds/src/set_ui.c Examining data/mpfi-1.5.3+ds/src/set_z.c Examining data/mpfi-1.5.3+ds/src/si_div.c Examining data/mpfi-1.5.3+ds/src/si_sub.c Examining data/mpfi-1.5.3+ds/src/sign.c Examining data/mpfi-1.5.3+ds/src/sin.c Examining data/mpfi-1.5.3+ds/src/sinh.c Examining data/mpfi-1.5.3+ds/src/sqr.c Examining data/mpfi-1.5.3+ds/src/sqrt.c Examining data/mpfi-1.5.3+ds/src/sub.c Examining data/mpfi-1.5.3+ds/src/sub_d.c Examining data/mpfi-1.5.3+ds/src/sub_fr.c Examining data/mpfi-1.5.3+ds/src/sub_q.c Examining data/mpfi-1.5.3+ds/src/sub_si.c Examining data/mpfi-1.5.3+ds/src/sub_ui.c Examining data/mpfi-1.5.3+ds/src/sub_z.c Examining data/mpfi-1.5.3+ds/src/swap.c Examining data/mpfi-1.5.3+ds/src/tan.c Examining data/mpfi-1.5.3+ds/src/tanh.c Examining data/mpfi-1.5.3+ds/src/ui_div.c Examining data/mpfi-1.5.3+ds/src/ui_sub.c Examining data/mpfi-1.5.3+ds/src/union.c Examining data/mpfi-1.5.3+ds/src/urandom.c Examining data/mpfi-1.5.3+ds/src/z_div.c Examining data/mpfi-1.5.3+ds/src/z_sub.c Examining data/mpfi-1.5.3+ds/tests/check_data.c Examining data/mpfi-1.5.3+ds/tests/mpfi-tests.c Examining data/mpfi-1.5.3+ds/tests/mpfi-tests.h Examining data/mpfi-1.5.3+ds/tests/random.c Examining data/mpfi-1.5.3+ds/tests/read_data.c Examining data/mpfi-1.5.3+ds/tests/tabs.c Examining data/mpfi-1.5.3+ds/tests/tacos.c Examining data/mpfi-1.5.3+ds/tests/tacosh.c Examining data/mpfi-1.5.3+ds/tests/tadd.c Examining data/mpfi-1.5.3+ds/tests/tadd_d.c Examining data/mpfi-1.5.3+ds/tests/tadd_fr.c Examining data/mpfi-1.5.3+ds/tests/tadd_q.c Examining data/mpfi-1.5.3+ds/tests/tadd_si.c Examining data/mpfi-1.5.3+ds/tests/tadd_ui.c Examining data/mpfi-1.5.3+ds/tests/tadd_z.c Examining data/mpfi-1.5.3+ds/tests/tasin.c Examining data/mpfi-1.5.3+ds/tests/tasinh.c Examining data/mpfi-1.5.3+ds/tests/tatan.c Examining data/mpfi-1.5.3+ds/tests/tatan2.c Examining data/mpfi-1.5.3+ds/tests/tatanh.c Examining data/mpfi-1.5.3+ds/tests/tbisect.c Examining data/mpfi-1.5.3+ds/tests/tblow.c Examining data/mpfi-1.5.3+ds/tests/tbounded_p.c Examining data/mpfi-1.5.3+ds/tests/tcbrt.c Examining data/mpfi-1.5.3+ds/tests/tcmp.c Examining data/mpfi-1.5.3+ds/tests/tcmp_d.c Examining data/mpfi-1.5.3+ds/tests/tcmp_fr.c Examining data/mpfi-1.5.3+ds/tests/tcmp_q.c Examining data/mpfi-1.5.3+ds/tests/tcmp_si.c Examining data/mpfi-1.5.3+ds/tests/tcmp_ui.c Examining data/mpfi-1.5.3+ds/tests/tcmp_z.c Examining data/mpfi-1.5.3+ds/tests/tconst_catalan.c Examining data/mpfi-1.5.3+ds/tests/tconst_euler.c Examining data/mpfi-1.5.3+ds/tests/tconst_log2.c Examining data/mpfi-1.5.3+ds/tests/tconst_pi.c Examining data/mpfi-1.5.3+ds/tests/tcos.c Examining data/mpfi-1.5.3+ds/tests/tcosh.c Examining data/mpfi-1.5.3+ds/tests/tcot.c Examining data/mpfi-1.5.3+ds/tests/tcoth.c Examining data/mpfi-1.5.3+ds/tests/tcsc.c Examining data/mpfi-1.5.3+ds/tests/tcsch.c Examining data/mpfi-1.5.3+ds/tests/td_div.c Examining data/mpfi-1.5.3+ds/tests/td_sub.c Examining data/mpfi-1.5.3+ds/tests/tdiam.c Examining data/mpfi-1.5.3+ds/tests/tdiam_abs.c Examining data/mpfi-1.5.3+ds/tests/tdiam_rel.c Examining data/mpfi-1.5.3+ds/tests/tdiv.c Examining data/mpfi-1.5.3+ds/tests/tdiv_2exp.c Examining data/mpfi-1.5.3+ds/tests/tdiv_2si.c Examining data/mpfi-1.5.3+ds/tests/tdiv_2ui.c Examining data/mpfi-1.5.3+ds/tests/tdiv_d.c Examining data/mpfi-1.5.3+ds/tests/tdiv_fr.c Examining data/mpfi-1.5.3+ds/tests/tdiv_q.c Examining data/mpfi-1.5.3+ds/tests/tdiv_si.c Examining data/mpfi-1.5.3+ds/tests/tdiv_ui.c Examining data/mpfi-1.5.3+ds/tests/tdiv_z.c Examining data/mpfi-1.5.3+ds/tests/terror.c Examining data/mpfi-1.5.3+ds/tests/texp.c Examining data/mpfi-1.5.3+ds/tests/texp2.c Examining data/mpfi-1.5.3+ds/tests/texpm1.c Examining data/mpfi-1.5.3+ds/tests/tfr_div.c Examining data/mpfi-1.5.3+ds/tests/tfr_sub.c Examining data/mpfi-1.5.3+ds/tests/tget_d.c Examining data/mpfi-1.5.3+ds/tests/tget_endpoints.c Examining data/mpfi-1.5.3+ds/tests/tget_fr.c Examining data/mpfi-1.5.3+ds/tests/tget_version.c Examining data/mpfi-1.5.3+ds/tests/thas_zero.c Examining data/mpfi-1.5.3+ds/tests/thypot.c Examining data/mpfi-1.5.3+ds/tests/tincrease.c Examining data/mpfi-1.5.3+ds/tests/tinf_p.c Examining data/mpfi-1.5.3+ds/tests/tinit.c Examining data/mpfi-1.5.3+ds/tests/tinit_set.c Examining data/mpfi-1.5.3+ds/tests/tintersect.c Examining data/mpfi-1.5.3+ds/tests/tinterv_d.c Examining data/mpfi-1.5.3+ds/tests/tinterv_fr.c Examining data/mpfi-1.5.3+ds/tests/tinterv_q.c Examining data/mpfi-1.5.3+ds/tests/tinterv_si.c Examining data/mpfi-1.5.3+ds/tests/tinterv_ui.c Examining data/mpfi-1.5.3+ds/tests/tinterv_z.c Examining data/mpfi-1.5.3+ds/tests/tinv.c Examining data/mpfi-1.5.3+ds/tests/tio_str.c Examining data/mpfi-1.5.3+ds/tests/tis_empty.c Examining data/mpfi-1.5.3+ds/tests/tis_inside.c Examining data/mpfi-1.5.3+ds/tests/tis_inside_d.c Examining data/mpfi-1.5.3+ds/tests/tis_inside_fr.c Examining data/mpfi-1.5.3+ds/tests/tis_inside_q.c Examining data/mpfi-1.5.3+ds/tests/tis_inside_si.c Examining data/mpfi-1.5.3+ds/tests/tis_inside_ui.c Examining data/mpfi-1.5.3+ds/tests/tis_inside_z.c Examining data/mpfi-1.5.3+ds/tests/tis_neg.c Examining data/mpfi-1.5.3+ds/tests/tis_nonneg.c Examining data/mpfi-1.5.3+ds/tests/tis_nonpos.c Examining data/mpfi-1.5.3+ds/tests/tis_pos.c Examining data/mpfi-1.5.3+ds/tests/tis_strictly_inside.c Examining data/mpfi-1.5.3+ds/tests/tis_strictly_neg.c Examining data/mpfi-1.5.3+ds/tests/tis_strictly_pos.c Examining data/mpfi-1.5.3+ds/tests/tis_zero.c Examining data/mpfi-1.5.3+ds/tests/tlog.c Examining data/mpfi-1.5.3+ds/tests/tlog10.c Examining data/mpfi-1.5.3+ds/tests/tlog1p.c Examining data/mpfi-1.5.3+ds/tests/tlog2.c Examining data/mpfi-1.5.3+ds/tests/tmag.c Examining data/mpfi-1.5.3+ds/tests/tmid.c Examining data/mpfi-1.5.3+ds/tests/tmig.c Examining data/mpfi-1.5.3+ds/tests/tmul.c Examining data/mpfi-1.5.3+ds/tests/tmul_2exp.c Examining data/mpfi-1.5.3+ds/tests/tmul_2si.c Examining data/mpfi-1.5.3+ds/tests/tmul_2ui.c Examining data/mpfi-1.5.3+ds/tests/tmul_d.c Examining data/mpfi-1.5.3+ds/tests/tmul_fr.c Examining data/mpfi-1.5.3+ds/tests/tmul_q.c Examining data/mpfi-1.5.3+ds/tests/tmul_si.c Examining data/mpfi-1.5.3+ds/tests/tmul_ui.c Examining data/mpfi-1.5.3+ds/tests/tmul_z.c Examining data/mpfi-1.5.3+ds/tests/tnan_p.c Examining data/mpfi-1.5.3+ds/tests/tneg.c Examining data/mpfi-1.5.3+ds/tests/tput_d.c Examining data/mpfi-1.5.3+ds/tests/tput_fr.c Examining data/mpfi-1.5.3+ds/tests/tput_q.c Examining data/mpfi-1.5.3+ds/tests/tput_si.c Examining data/mpfi-1.5.3+ds/tests/tput_ui.c Examining data/mpfi-1.5.3+ds/tests/tput_z.c Examining data/mpfi-1.5.3+ds/tests/tq_div.c Examining data/mpfi-1.5.3+ds/tests/tq_sub.c Examining data/mpfi-1.5.3+ds/tests/tround_prec.c Examining data/mpfi-1.5.3+ds/tests/tsec.c Examining data/mpfi-1.5.3+ds/tests/tsech.c Examining data/mpfi-1.5.3+ds/tests/tset.c Examining data/mpfi-1.5.3+ds/tests/tset_d.c Examining data/mpfi-1.5.3+ds/tests/tset_fr.c Examining data/mpfi-1.5.3+ds/tests/tset_q.c Examining data/mpfi-1.5.3+ds/tests/tset_si.c Examining data/mpfi-1.5.3+ds/tests/tset_str.c Examining data/mpfi-1.5.3+ds/tests/tset_ui.c Examining data/mpfi-1.5.3+ds/tests/tset_z.c Examining data/mpfi-1.5.3+ds/tests/tsi_div.c Examining data/mpfi-1.5.3+ds/tests/tsi_sub.c Examining data/mpfi-1.5.3+ds/tests/tsin.c Examining data/mpfi-1.5.3+ds/tests/tsinh.c Examining data/mpfi-1.5.3+ds/tests/tsqr.c Examining data/mpfi-1.5.3+ds/tests/tsqrt.c Examining data/mpfi-1.5.3+ds/tests/tsub.c Examining data/mpfi-1.5.3+ds/tests/tsub_d.c Examining data/mpfi-1.5.3+ds/tests/tsub_fr.c Examining data/mpfi-1.5.3+ds/tests/tsub_q.c Examining data/mpfi-1.5.3+ds/tests/tsub_si.c Examining data/mpfi-1.5.3+ds/tests/tsub_ui.c Examining data/mpfi-1.5.3+ds/tests/tsub_z.c Examining data/mpfi-1.5.3+ds/tests/tswap.c Examining data/mpfi-1.5.3+ds/tests/ttan.c Examining data/mpfi-1.5.3+ds/tests/ttanh.c Examining data/mpfi-1.5.3+ds/tests/tui_div.c Examining data/mpfi-1.5.3+ds/tests/tui_sub.c Examining data/mpfi-1.5.3+ds/tests/tunion.c Examining data/mpfi-1.5.3+ds/tests/type_i.c Examining data/mpfi-1.5.3+ds/tests/type_id.c Examining data/mpfi-1.5.3+ds/tests/type_idi.c Examining data/mpfi-1.5.3+ds/tests/type_ii.c Examining data/mpfi-1.5.3+ds/tests/type_iid.c Examining data/mpfi-1.5.3+ds/tests/type_iii.c Examining data/mpfi-1.5.3+ds/tests/type_iiq.c Examining data/mpfi-1.5.3+ds/tests/type_iir.c Examining data/mpfi-1.5.3+ds/tests/type_iis.c Examining data/mpfi-1.5.3+ds/tests/type_iiu.c Examining data/mpfi-1.5.3+ds/tests/type_iiz.c Examining data/mpfi-1.5.3+ds/tests/type_iq.c Examining data/mpfi-1.5.3+ds/tests/type_iqi.c Examining data/mpfi-1.5.3+ds/tests/type_ir.c Examining data/mpfi-1.5.3+ds/tests/type_iri.c Examining data/mpfi-1.5.3+ds/tests/type_is.c Examining data/mpfi-1.5.3+ds/tests/type_isi.c Examining data/mpfi-1.5.3+ds/tests/type_iu.c Examining data/mpfi-1.5.3+ds/tests/type_iui.c Examining data/mpfi-1.5.3+ds/tests/type_iz.c Examining data/mpfi-1.5.3+ds/tests/type_izi.c Examining data/mpfi-1.5.3+ds/tests/type_ri.c Examining data/mpfi-1.5.3+ds/tests/tz_div.c Examining data/mpfi-1.5.3+ds/tests/tz_sub.c Examining data/mpfi-1.5.3+ds/debian/adhoc/examples/mpfi_example_pi.c Examining data/mpfi-1.5.3+ds/debian/adhoc/examples/mpfi_version.c FINAL RESULTS: data/mpfi-1.5.3+ds/tests/read_data.c:53:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (pathname, "%s/%s", src_dir, file_name); data/mpfi-1.5.3+ds/tests/mpfi-tests.c:66:17: [3] (random) random: 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. function->random (function); data/mpfi-1.5.3+ds/tests/mpfi-tests.h:186:10: [3] (random) random: 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. void (*random) (mpfi_function_ptr); data/mpfi-1.5.3+ds/tests/random.c:79:22: [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. environment_seed = getenv ("MPFI_CHECK_RANDOMIZE"); data/mpfi-1.5.3+ds/tests/read_data.c:44:13: [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. src_dir = getenv ("srcdir"); data/mpfi-1.5.3+ds/tests/tadd_q.c:91:7: [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. if (getenv ("MPFI_CHECK_EXPENSIVE_OVERFLOW") != NULL) data/mpfi-1.5.3+ds/tests/random.c:83:12: [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). seed = atoi (environment_seed); data/mpfi-1.5.3+ds/tests/read_data.c:54:8: [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). fp = fopen (pathname, "r"); data/mpfi-1.5.3+ds/tests/terror.c:59: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). stream = fopen ("error.tmp", "r"); data/mpfi-1.5.3+ds/tests/tio_str.c:51:18: [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). tmp_file = fopen (TMP_FILENAME, "w"); data/mpfi-1.5.3+ds/tests/tio_str.c:72:18: [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). tmp_file = fopen (TMP_FILENAME, "r"); data/mpfi-1.5.3+ds/src/inp_str.c:46:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (s); data/mpfi-1.5.3+ds/src/inp_str.c:48:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (s); data/mpfi-1.5.3+ds/src/inp_str.c:70:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (s); data/mpfi-1.5.3+ds/tests/read_data.c:48:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pathname = (char *) malloc ((strlen (src_dir)) + strlen (file_name) + 2); data/mpfi-1.5.3+ds/tests/read_data.c:48:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pathname = (char *) malloc ((strlen (src_dir)) + strlen (file_name) + 2); data/mpfi-1.5.3+ds/tests/read_data.c:74:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:108:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:111:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:122:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:160:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:180:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:222:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:258:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:294:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:319:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:340:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:365:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/read_data.c:387:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextchar = getc (f); data/mpfi-1.5.3+ds/tests/terror.c:41:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = (fgetc (stream) != EOF); data/mpfi-1.5.3+ds/tests/tio_str.c:39:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mpfi_t read; data/mpfi-1.5.3+ds/tests/tio_str.c:43:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mpfi_init2 (read, prec_max); data/mpfi-1.5.3+ds/tests/tio_str.c:47:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mpfi_set_prec (read, p); data/mpfi-1.5.3+ds/tests/tio_str.c:78:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n_read = mpfi_inp_str (read, tmp_file, base); data/mpfi-1.5.3+ds/tests/tio_str.c:82:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (mpfi_is_inside (i, read) == 0 data/mpfi-1.5.3+ds/tests/tio_str.c:87:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mpfi_out_str (stdout, 16, 0, read); data/mpfi-1.5.3+ds/tests/tio_str.c:109:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mpfi_clear (read); data/mpfi-1.5.3+ds/tests/tio_str.c:173:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc (stream_mpfr)) != EOF) { ANALYSIS SUMMARY: Hits = 38 Lines analyzed = 27476 in approximately 0.91 seconds (30034 lines/second) Physical Source Lines of Code (SLOC) = 14992 Hits@level = [0] 792 [1] 27 [2] 5 [3] 5 [4] 1 [5] 0 Hits@level+ = [0+] 830 [1+] 38 [2+] 11 [3+] 6 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 55.3629 [1+] 2.53469 [2+] 0.733725 [3+] 0.400213 [4+] 0.0667022 [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.