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/r-cran-bayesm-3.1-4+dfsg/src/lndMvst_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rordprobitGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rmixGibbs_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/breg_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rsurGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rhierNegbinRw_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/utilityFunctions.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/llmnl_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/ghkvec_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rmvpGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rnegbinRw_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rhierMnlRwMixture_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/functionTiming.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rmvst_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/trunNorm.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rivgibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rivDP_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/lndMvn_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/lndIChisq_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/bayesBLP_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rhierLinearMixture_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rmnpGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rhierLinearModel_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rDPGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rdirichlet_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/runiregGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rtrun_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rmultireg_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rmnlIndepMetrop_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rwishart_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/lndIWishart_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rscaleUsage_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/cgetC_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/runireg_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/RcppExports.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rbprobitGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rnmixGibbs_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rhierMnlDP_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/rmixture_rcpp.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/src/clusterMix_rcpp_loop.cpp Examining data/r-cran-bayesm-3.1-4+dfsg/inst/include/bayesm.h FINAL RESULTS: data/r-cran-bayesm-3.1-4+dfsg/src/clusterMix_rcpp_loop.cpp:84: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 buf[32]; data/r-cran-bayesm-3.1-4+dfsg/src/clusterMix_rcpp_loop.cpp:99:9: [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(buf, " %d\n", rep+1); data/r-cran-bayesm-3.1-4+dfsg/src/clusterMix_rcpp_loop.cpp:121:9: [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(buf, " %d\n", rep+1); data/r-cran-bayesm-3.1-4+dfsg/src/functionTiming.cpp:6:1: [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 buf[100]; data/r-cran-bayesm-3.1-4+dfsg/src/functionTiming.cpp:15: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 buf[32]; data/r-cran-bayesm-3.1-4+dfsg/src/functionTiming.cpp:18:5: [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(buf, " %d (%.1f)\n", rep+1, timetoend); data/r-cran-bayesm-3.1-4+dfsg/src/functionTiming.cpp:24: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 buf[32]; data/r-cran-bayesm-3.1-4+dfsg/src/functionTiming.cpp:26:5: [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(buf, " Total Time Elapsed: %.2f \n", difftime(ctime, itime) / 60.0); ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 6590 in approximately 0.20 seconds (33336 lines/second) Physical Source Lines of Code (SLOC) = 3978 Hits@level = [0] 0 [1] 0 [2] 8 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 8 [1+] 8 [2+] 8 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 2.01106 [1+] 2.01106 [2+] 2.01106 [3+] 0 [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.