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-qtl-1.46-2/src/hmm_ri8self.h
Examining data/r-cran-qtl-1.46-2/src/scantwo_mr.h
Examining data/r-cran-qtl-1.46-2/src/hmm_bgmagic16.h
Examining data/r-cran-qtl-1.46-2/src/scanone_ehk.c
Examining data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.h
Examining data/r-cran-qtl-1.46-2/src/hmm_ri4self.h
Examining data/r-cran-qtl-1.46-2/src/scantwo_imp.h
Examining data/r-cran-qtl-1.46-2/src/mqmdatatypes.cpp
Examining data/r-cran-qtl-1.46-2/src/mqmdatatypes.h
Examining data/r-cran-qtl-1.46-2/src/discan.h
Examining data/r-cran-qtl-1.46-2/src/R_init.c
Examining data/r-cran-qtl-1.46-2/src/hmm_main.h
Examining data/r-cran-qtl-1.46-2/src/util.c
Examining data/r-cran-qtl-1.46-2/src/hmm_ri8selfIRIP1.c
Examining data/r-cran-qtl-1.46-2/src/scanone_np.h
Examining data/r-cran-qtl-1.46-2/src/forwsel.c
Examining data/r-cran-qtl-1.46-2/src/vbscan.c
Examining data/r-cran-qtl-1.46-2/src/hmm_bc.c
Examining data/r-cran-qtl-1.46-2/src/hmm_ri8sib.h
Examining data/r-cran-qtl-1.46-2/src/discan_covar.h
Examining data/r-cran-qtl-1.46-2/src/findDupMarkers_notexact.h
Examining data/r-cran-qtl-1.46-2/src/markerlrt.c
Examining data/r-cran-qtl-1.46-2/src/mqmmapqtl.h
Examining data/r-cran-qtl-1.46-2/src/fitqtl_imp_binary.c
Examining data/r-cran-qtl-1.46-2/src/hmm_bgmagic16.c
Examining data/r-cran-qtl-1.46-2/src/hmm_ri4self.c
Examining data/r-cran-qtl-1.46-2/src/info.c
Examining data/r-cran-qtl-1.46-2/src/mqmscan.cpp
Examining data/r-cran-qtl-1.46-2/src/scanone_em_covar.c
Examining data/r-cran-qtl-1.46-2/src/hmm_util.c
Examining data/r-cran-qtl-1.46-2/src/scantwo_em.h
Examining data/r-cran-qtl-1.46-2/src/hmm_main.c
Examining data/r-cran-qtl-1.46-2/src/discan.c
Examining data/r-cran-qtl-1.46-2/src/hmm_bc.h
Examining data/r-cran-qtl-1.46-2/src/info.h
Examining data/r-cran-qtl-1.46-2/src/hmm_ri8self.c
Examining data/r-cran-qtl-1.46-2/src/mqmaugment.cpp
Examining data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c
Examining data/r-cran-qtl-1.46-2/src/zeroin.h
Examining data/r-cran-qtl-1.46-2/src/mqmeliminate.h
Examining data/r-cran-qtl-1.46-2/src/scanone_imp.c
Examining data/r-cran-qtl-1.46-2/src/summary_scantwo.c
Examining data/r-cran-qtl-1.46-2/src/ripple.h
Examining data/r-cran-qtl-1.46-2/src/hmm_f2.h
Examining data/r-cran-qtl-1.46-2/src/discan_covar.c
Examining data/r-cran-qtl-1.46-2/src/hmm_bcsft.h
Examining data/r-cran-qtl-1.46-2/src/mqmmixture.cpp
Examining data/r-cran-qtl-1.46-2/src/R_init.h
Examining data/r-cran-qtl-1.46-2/src/hmm_bci.h
Examining data/r-cran-qtl-1.46-2/src/scantwopermhk.c
Examining data/r-cran-qtl-1.46-2/src/hmm_4way.h
Examining data/r-cran-qtl-1.46-2/src/inferFounderHap.c
Examining data/r-cran-qtl-1.46-2/src/simulate.h
Examining data/r-cran-qtl-1.46-2/src/scanone_em.h
Examining data/r-cran-qtl-1.46-2/src/mqmprob.cpp
Examining data/r-cran-qtl-1.46-2/src/scantwo_mr.c
Examining data/r-cran-qtl-1.46-2/src/mqmmixture.h
Examining data/r-cran-qtl-1.46-2/src/scanone_hk.c
Examining data/r-cran-qtl-1.46-2/src/simulate.c
Examining data/r-cran-qtl-1.46-2/src/stahl_mf.c
Examining data/r-cran-qtl-1.46-2/src/ril48_reorg.h
Examining data/r-cran-qtl-1.46-2/src/scanone_em_covar.h
Examining data/r-cran-qtl-1.46-2/src/scantwopermhk.h
Examining data/r-cran-qtl-1.46-2/src/simulate_ril.c
Examining data/r-cran-qtl-1.46-2/src/countXO.h
Examining data/r-cran-qtl-1.46-2/src/test_bcsft.c
Examining data/r-cran-qtl-1.46-2/src/scantwo_em.c
Examining data/r-cran-qtl-1.46-2/src/scanone_hk_binary.c
Examining data/r-cran-qtl-1.46-2/src/vbscan.h
Examining data/r-cran-qtl-1.46-2/src/mqmscan.h
Examining data/r-cran-qtl-1.46-2/src/hmm_f2.c
Examining data/r-cran-qtl-1.46-2/src/scanone_np.c
Examining data/r-cran-qtl-1.46-2/src/forwsel.h
Examining data/r-cran-qtl-1.46-2/src/scanone_ehk.h
Examining data/r-cran-qtl-1.46-2/src/scanone_hk.h
Examining data/r-cran-qtl-1.46-2/src/scanone_mr.h
Examining data/r-cran-qtl-1.46-2/src/lapackutil.h
Examining data/r-cran-qtl-1.46-2/src/mqmregression.h
Examining data/r-cran-qtl-1.46-2/src/pickMarkerSubset.c
Examining data/r-cran-qtl-1.46-2/src/hmm_ri8selfIRIP1.h
Examining data/r-cran-qtl-1.46-2/src/effectscan.c
Examining data/r-cran-qtl-1.46-2/src/hmm_ri4sib.h
Examining data/r-cran-qtl-1.46-2/src/fitqtl_hk.c
Examining data/r-cran-qtl-1.46-2/src/scanone_mr.c
Examining data/r-cran-qtl-1.46-2/src/standalone.h
Examining data/r-cran-qtl-1.46-2/src/ripple.c
Examining data/r-cran-qtl-1.46-2/src/hmm_f2i.h
Examining data/r-cran-qtl-1.46-2/src/scantwo_hk.c
Examining data/r-cran-qtl-1.46-2/src/scantwo_hk.h
Examining data/r-cran-qtl-1.46-2/src/util.h
Examining data/r-cran-qtl-1.46-2/src/scanone_hk_binary.h
Examining data/r-cran-qtl-1.46-2/src/zeroin.c
Examining data/r-cran-qtl-1.46-2/src/hmm_bci.c
Examining data/r-cran-qtl-1.46-2/src/hmm_ri4sib.c
Examining data/r-cran-qtl-1.46-2/src/lapackutil.c
Examining data/r-cran-qtl-1.46-2/src/mqmmapqtl.cpp
Examining data/r-cran-qtl-1.46-2/src/ril48_reorg.c
Examining data/r-cran-qtl-1.46-2/src/scanone_imp.h
Examining data/r-cran-qtl-1.46-2/src/hmm_f2i.c
Examining data/r-cran-qtl-1.46-2/src/fill_geno_nodblXO.c
Examining data/r-cran-qtl-1.46-2/src/scantwo_binary_em.h
Examining data/r-cran-qtl-1.46-2/src/fitqtl_hk_binary.h
Examining data/r-cran-qtl-1.46-2/src/pickMarkerSubset.h
Examining data/r-cran-qtl-1.46-2/src/hmm_bcsft.c
Examining data/r-cran-qtl-1.46-2/src/fitqtl_imp.c
Examining data/r-cran-qtl-1.46-2/src/mqm.h
Examining data/r-cran-qtl-1.46-2/src/hmm_util.h
Examining data/r-cran-qtl-1.46-2/src/markerlrt.h
Examining data/r-cran-qtl-1.46-2/src/simulate_ril.h
Examining data/r-cran-qtl-1.46-2/src/mqmprob.h
Examining data/r-cran-qtl-1.46-2/src/inferFounderHap.h
Examining data/r-cran-qtl-1.46-2/src/stahl_mf.h
Examining data/r-cran-qtl-1.46-2/src/scantwo_imp.c
Examining data/r-cran-qtl-1.46-2/src/fitqtl_hk_binary.c
Examining data/r-cran-qtl-1.46-2/src/fitqtl_imp_binary.h
Examining data/r-cran-qtl-1.46-2/src/mqmaugment.h
Examining data/r-cran-qtl-1.46-2/src/fitqtl_imp.h
Examining data/r-cran-qtl-1.46-2/src/findDupMarkers_notexact.c
Examining data/r-cran-qtl-1.46-2/src/hmm_ri8sib.c
Examining data/r-cran-qtl-1.46-2/src/mqmeliminate.cpp
Examining data/r-cran-qtl-1.46-2/src/fitqtl_hk.h
Examining data/r-cran-qtl-1.46-2/src/countXO.c
Examining data/r-cran-qtl-1.46-2/src/fill_geno_nodblXO.h
Examining data/r-cran-qtl-1.46-2/src/scantwo_binary_em.c
Examining data/r-cran-qtl-1.46-2/src/effectscan.h
Examining data/r-cran-qtl-1.46-2/src/summary_scantwo.h
Examining data/r-cran-qtl-1.46-2/src/hmm_4way.c
Examining data/r-cran-qtl-1.46-2/src/scanone_em.c
Examining data/r-cran-qtl-1.46-2/src/mqmregression.cpp
Examining data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmdebugout.cpp
Examining data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp

FINAL RESULTS:

data/r-cran-qtl-1.46-2/src/hmm_bci.c:131:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pattern, "%s%d.%df", "%", ndigits+3, ndigits+1);
data/r-cran-qtl-1.46-2/src/hmm_bci.c:224:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change = ", pattern);
data/r-cran-qtl-1.46-2/src/hmm_bci.c:281:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change at last step = ", pattern);
data/r-cran-qtl-1.46-2/src/hmm_bcsft.c:658:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pattern, "%s%d.%df", "%", ndigits+3, ndigits+1);
data/r-cran-qtl-1.46-2/src/hmm_bcsft.c:744:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change = ", pattern);
data/r-cran-qtl-1.46-2/src/hmm_bcsft.c:789:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change at last step = ", pattern);
data/r-cran-qtl-1.46-2/src/hmm_f2i.c:133:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pattern, "%s%d.%df", "%", ndigits+3, ndigits+1);
data/r-cran-qtl-1.46-2/src/hmm_f2i.c:226:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change = ", pattern);
data/r-cran-qtl-1.46-2/src/hmm_f2i.c:280:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change at last step = ", pattern);
data/r-cran-qtl-1.46-2/src/hmm_main.c:480:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pattern, "%s%d.%df", "%", ndigits+3, ndigits+1);
data/r-cran-qtl-1.46-2/src/hmm_main.c:580:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change = ", pattern);
data/r-cran-qtl-1.46-2/src/hmm_main.c:640:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(text, "%s%s\n", "  max rel've change at last step = ", pattern);
data/r-cran-qtl-1.46-2/src/mqm.h:54:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(redirect_info, format, ## __VA_ARGS__); \
data/r-cran-qtl-1.46-2/src/mqm.h:63:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(redirect_info,format, ## __VA_ARGS__); \
data/r-cran-qtl-1.46-2/src/standalone.h:36:26:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define Rprintf(args...) printf(args)
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmdebugout.cpp:71:15:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt_long(argc, argv, "dpo:",long_options, &option_index)) != -1)
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:292:15:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt_long(argc, argv, "vd:h:p:g:m:c:s:t:o:a:b:e:f:q:i:j:k:l:",long_options, &option_index)) != -1)
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmdebugout.cpp:19: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).
  myfile.open(filename);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmdebugout.cpp:91:14:  [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).
      fout = fopen(outputfile,"w");
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:48: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).
  myfile.open(filename);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:301:20:  [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).
      debuglevel = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:304: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).
      phenotype = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:325:38:  [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).
      mqmalgorithmsettings.stepmin = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:328:38:  [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).
      mqmalgorithmsettings.stepmax = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:332:39:  [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).
      mqmalgorithmsettings.stepsize = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:340:41:  [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).
      mqmalgorithmsettings.windowsize = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:344:38:  [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).
      mqmalgorithmsettings.maxiter = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:352:47:  [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).
      mqmalgorithmsettings.max_totalaugment = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:356:45:  [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).
      mqmalgorithmsettings.max_indaugment = atoi(optarg);
data/r-cran-qtl-1.46-2/inst/contrib/bin/mqmmain.cpp:376:14:  [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).
      fout = fopen(outputfile,"w");
data/r-cran-qtl-1.46-2/src/effectscan.c:117:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(resid, pheno, nind*sizeof(double));
data/r-cran-qtl-1.46-2/src/effectscan.c:147:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(var+j*ngen, x+j*nind, ngen*sizeof(double));
data/r-cran-qtl-1.46-2/src/fitqtl_hk_binary.c:328:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(designmat, X[0], sizefull*n_ind*sizeof(double));
data/r-cran-qtl-1.46-2/src/fitqtl_hk_binary.c:365:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(X[0], designmat, sizefull*n_ind*sizeof(double));
data/r-cran-qtl-1.46-2/src/fitqtl_imp_binary.c:429:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(designmat, x, n_ind*sizefull*sizeof(double));
data/r-cran-qtl-1.46-2/src/fitqtl_imp_binary.c:466:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(x, designmat, n_ind*sizefull*sizeof(double));
data/r-cran-qtl-1.46-2/src/hmm_bci.c:98: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 pattern[100], text[200];
data/r-cran-qtl-1.46-2/src/hmm_bcsft.c:631: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 pattern[100], text[200];
data/r-cran-qtl-1.46-2/src/hmm_f2i.c:99: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 pattern[100], text[200];
data/r-cran-qtl-1.46-2/src/hmm_main.c:460: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 pattern[100], text[200];
data/r-cran-qtl-1.46-2/src/lapackutil.c:71:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(x0, x0_bk, *n_ind*(*ncolx0)*sizeof(double));
data/r-cran-qtl-1.46-2/src/lapackutil.c:72:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tmppheno, pheno, *n_ind*(*nphe)*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_hk.c:207:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(x_bk, x, n_ind*ncolx*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_hk.c:210:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_hk.c:237:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(coef+k*ncolx, tmppheno+k*n_ind, ncolx*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_hk.c:265:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(coef+k*ncolx, tmppheno+k*n_ind, ncolx*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_hk_binary.c:165:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(x_bk, x, n_ind*ncolx*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_hk_binary.c:206:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x, x_bk, ncolx*n_ind*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:194:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:209:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:293:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(x02, x0, n_ind*ncolx0*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:326:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(coef+i*ncolx0, tmppheno+i*n_ind, ncolx0*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:360:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(coef+i*ncolx0, tmppheno+i*n_ind, ncolx0*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:454:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(x_bk, x, n_ind*ncolx*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:484:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(coef+i*ncolx, tmppheno+i*n_ind, ncolx*sizeof(double));
data/r-cran-qtl-1.46-2/src/scanone_imp.c:520:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(coef+i*ncolx, tmppheno+i*n_ind, ncolx*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:195:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_a_temp*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:241:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(x, x_bk, n_col_a_temp*n_ind*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:311:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_f_temp*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:355:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(x, x_bk, n_col_f_temp*n_ind*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:536:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_a*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:580:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(x, x_bk, n_col_a*n_ind*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:640:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_f*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_binary_hk.c:684:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(x, x_bk, n_col_f*n_ind*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:227:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_a_temp*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:231:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:274:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                            memcpy(coef+itmp*n_col_a_temp, tmppheno+itmp*n_ind, n_col_a_temp*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:329:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_f_temp*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:333:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:377:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                            memcpy(coef+itmp*n_col_f_temp, tmppheno+itmp*n_ind, n_col_f_temp*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:567:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_a*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:570:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:608:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                            memcpy(coef+itmp*n_col_a, tmppheno+itmp*n_ind, n_col_a*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:652:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(x_bk, x, n_ind*n_col_f*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:655:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_hk.c:694:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                            memcpy(coef+itmp*n_col_f, tmppheno+itmp*n_ind, n_col_f*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:242:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:257:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:420:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(x_bk, x, n_ind*n_col_a*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:423:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:451:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(coef+i*n_col_a, tmppheno+i*n_ind, n_col_a*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:484:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(coef+i*n_col_a, tmppheno+i*n_ind, n_col_a*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:563:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(x_bk, x, n_ind*n_col_f*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:566:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(tmppheno, pheno, n_ind*nphe*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:593:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(coef+i*n_col_f, tmppheno+i*n_ind, n_col_f*sizeof(double));
data/r-cran-qtl-1.46-2/src/scantwo_imp.c:626:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(coef+i*n_col_f, tmppheno+i*n_ind, n_col_f*sizeof(double));

ANALYSIS SUMMARY:

Hits = 86
Lines analyzed = 31429 in approximately 0.98 seconds (31941 lines/second)
Physical Source Lines of Code (SLOC) = 16594
Hits@level = [0]  39 [1]   0 [2]  69 [3]   2 [4]  15 [5]   0
Hits@level+ = [0+] 125 [1+]  86 [2+]  86 [3+]  17 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 7.53284 [1+] 5.1826 [2+] 5.1826 [3+] 1.02447 [4+] 0.903941 [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.