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/qtltools-1.3.1+dfsg/lib/OTools/basic_stats.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/full_linear_regression.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/timer.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/random_number.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/pca.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/verbose.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/ranker.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/string_utils.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/otools.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/residualizer.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/genomic_region.h
Examining data/qtltools-1.3.1+dfsg/lib/OTools/interval_tree.h
Examining data/qtltools-1.3.1+dfsg/src/mode_pca/pca_pca.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_pca/pca_pca.h
Examining data/qtltools-1.3.1+dfsg/src/mode_pca/pca_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_pca/pca_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_pca/pca_read_data.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_pca/pca_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_gwas/gwas_read_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_gwas/gwas_analysis_pass.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_gwas/gwas_read_covariates.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_gwas/gwas_managment.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_gwas/gwas_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_gwas/gwas_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_gwas/gwas_initilization.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_read_qtl.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_process.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_read_annotation.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_bamstat/bamstat_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_bamstat/bamstat_write_output.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_bamstat/bamstat_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_bamstat/bamstat_read_bam.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_bamstat/bamstat_read_annotations.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_quan/quan_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.h
Examining data/qtltools-1.3.1+dfsg/src/mode_quan/quan_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_quan/quan_readBAM.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_quan/quan_writeResults.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_quan/quan_readGTF.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_learn_beta.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_learn_dof.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_permutation_pass.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_chunking.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_covariates.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_conditionnal_pass.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_genotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_initilization.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_collapse_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_nominal_pass.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_thresholds.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_read_qtl.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_read_annotation.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_read_tss.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_process.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_run_analyses.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_genotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_gtf.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_blacklist.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_sequences.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_fasta.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_ase/ase_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_match/match_read_genotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_match/match_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_match/match_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_match/match_read_sequences.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_match/match_process.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_match/match_managment.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_correct/correct_processing.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_correct/correct_read_covariates.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_correct/correct_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_correct/correct_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_correct/correct_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/common/filter.h
Examining data/qtltools-1.3.1+dfsg/src/common/data.cpp
Examining data/qtltools-1.3.1+dfsg/src/common/data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_read_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_binning_process.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_read_reference_genotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_process.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_routines.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_read_auxillliary_data.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_genotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_initilization.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_covariates.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_nominal_pass.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_qtls.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_gwas_cis.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_chunking.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_covariates.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_gwas_trans.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_mergeQTL_trans.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_get_hotspots.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_genotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_sampling.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_common.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_mergeQTL_cis.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_collapse_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_initilization.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_managment.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_adjust.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_chunking.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_read_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_initilization.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_analysis_pass.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_read_samples.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_read_covariates.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_learn_beta.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_trans/trans_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/QTLtools.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_read_phenotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_read_get_hotspots.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_management.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_initilization.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_read_covariates.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_read_genotypes.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_union/union_union.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_extract/extract_data.h
Examining data/qtltools-1.3.1+dfsg/src/mode_extract/extract_managment.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_extract/extract_main.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_extract/extract_read_data.cpp
Examining data/qtltools-1.3.1+dfsg/src/mode_extract/extract_write.cpp

FINAL RESULTS:

data/qtltools-1.3.1+dfsg/src/mode_quan/quan_main.cpp:166:17:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    	string r_p(realpath(gtff, NULL));
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:36:20:  [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_descriptor.open(filename.c_str(), ios::in | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:39:20:  [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_descriptor.open(filename.c_str(), ios::in | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:41:26:  [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).
		} else file_descriptor.open(filename.c_str());
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:68:20:  [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_descriptor.open(filename.c_str(), ios::out | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:71:20:  [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_descriptor.open(filename.c_str(), ios::out | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:73:26:  [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).
		} else file_descriptor.open(filename.c_str());
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:79: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).
	void open(string filename){
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:81:20:  [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_descriptor.open(filename.c_str(), ios::out | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:84:20:  [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_descriptor.open(filename.c_str(), ios::out | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:86:26:  [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).
		} else file_descriptor.open(filename.c_str());
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:92:20:  [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_descriptor.open(filename.c_str(), ios::app | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:95:20:  [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_descriptor.open(filename.c_str(), ios::app | ios::binary);
data/qtltools-1.3.1+dfsg/lib/OTools/compressed_io.h:97:26:  [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).
		} else file_descriptor.open(filename.c_str(), ios::app);
data/qtltools-1.3.1+dfsg/lib/OTools/timer.h:54: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 buffer[256];
data/qtltools-1.3.1+dfsg/lib/OTools/verbose.h:45: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).
		log.open(fname.c_str());
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_blacklist.cpp:50:30:  [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).
        unsigned int start = atoi(str[1].c_str());
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_blacklist.cpp:51:28:  [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).
        unsigned int end = atoi(str[2].c_str());
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_genotypes.cpp:45: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).
		fdo.open(olog);
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_gtf.cpp:51:30:  [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).
        unsigned int start = atoi(str[3].c_str());
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_gtf.cpp:52:28:  [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).
        unsigned int end = atoi(str[4].c_str());
data/qtltools-1.3.1+dfsg/src/mode_bamstat/bamstat_read_annotations.cpp:26:52:  [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).
                R.push_back(bamstat_region(tok[0], atoi(tok[1].c_str()), atoi(tok[2].c_str())));
data/qtltools-1.3.1+dfsg/src/mode_bamstat/bamstat_read_annotations.cpp:26:74:  [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).
                R.push_back(bamstat_region(tok[0], atoi(tok[1].c_str()), atoi(tok[2].c_str())));
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_genotypes.cpp:171:42:  [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).
                genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_genotypes.cpp:172:40:  [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).
                genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_genotypes.cpp:193:42:  [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).
                genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_genotypes.cpp:194:40:  [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).
                genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_phenotypes.cpp:60:43:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_phenotypes.cpp:61: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).
                phenotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_phenotypes.cpp:87: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).
                    phenotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_phenotypes.cpp:88: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).
                    phenotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_phenotypes.cpp:141:31:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_cis/cis_read_phenotypes.cpp:142:29:  [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_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_extract/extract_read_data.cpp:51:42:  [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).
                variable_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_extract/extract_read_data.cpp:52:40:  [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).
                variable_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_extract/extract_read_data.cpp:67:46:  [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).
                    variable_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_extract/extract_read_data.cpp:68:44:  [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).
                    variable_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_read_annotation.cpp:32:24:  [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).
			ann_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_read_annotation.cpp:33:22:  [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).
			ann_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_fdensity/fdensity_read_qtl.cpp:33:22:  [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).
			tss_pos.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_read_annotation.cpp:32:24:  [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).
			ann_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_read_annotation.cpp:33:22:  [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).
			ann_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_read_qtl.cpp:34:22:  [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).
			qtl_pos.push_back(atoi(str[1].c_str()) - tss_pos[idx_tss]);
data/qtltools-1.3.1+dfsg/src/mode_fenrich/fenrich_read_tss.cpp:33:22:  [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).
			tss_pos.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_read_phenotypes.cpp:47:21:  [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).
				vpos.push_back((atoi(tokens[1].c_str()) + atoi(tokens[2].c_str()))/2);
data/qtltools-1.3.1+dfsg/src/mode_genrich/genrich_read_phenotypes.cpp:47: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).
				vpos.push_back((atoi(tokens[1].c_str()) + atoi(tokens[2].c_str()))/2);
data/qtltools-1.3.1+dfsg/src/mode_pca/pca_read_data.cpp:220:14:  [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).
			int pos = atoi(tokens[1].c_str()) + 1;
data/qtltools-1.3.1+dfsg/src/mode_pca/pca_read_data.cpp:253:14:  [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).
			int pos = atoi(tokens[1].c_str()) + 1;
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_main.cpp:164:26:  [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).
        if (FILE *file = fopen(gtff, "r")) fclose(file);
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_readBAM.cpp:203: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(&n, s, 4);
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_readGTF.cpp:35:30:  [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).
        unsigned int start = atoi(str[3].c_str());
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_readGTF.cpp:36:28:  [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).
        unsigned int end = atoi(str[4].c_str());
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_writeResults.cpp:214: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[514]; //enough to hold a 512 bit in base 2
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp:106:76:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); }
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp:362: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(dstState, srcState, sizeof(*dstState));
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp:373: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(statePtr, &state, sizeof(state));
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp:510: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(dst, &hash, sizeof(*dst));
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp:735: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(dstState, srcState, sizeof(*dstState));
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp:746: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(statePtr, &state, sizeof(state));
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.cpp:886: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(dst, &hash, sizeof(*dst));
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.h:184:27:  [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.
typedef struct { unsigned char digest[4]; } XXH32_canonical_t;
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_xxhash.h:219:27:  [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.
typedef struct { unsigned char digest[8]; } XXH64_canonical_t;
data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_genotypes.cpp:162:29:  [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).
			genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_genotypes.cpp:163:27:  [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).
			genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_phenotypes.cpp:54:31:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rep/rep_read_phenotypes.cpp:55:29:  [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_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_data.h:453:10:  [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).
		rank = atoi(str[3].c_str());
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_data.h:465:10:  [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).
		rank = atoi(str[rank_column].c_str());
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_management.cpp:180:18:  [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).
	        	mem += atoi(str[1].c_str()) * 1024;
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_genotypes.cpp:205:42:  [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).
                genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_genotypes.cpp:206:40:  [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).
                genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_genotypes.cpp:229:42:  [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).
                genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_genotypes.cpp:230:40:  [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).
                genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_genotypes.cpp:421:42:  [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).
                genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_genotypes.cpp:422:40:  [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).
                genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_get_hotspots.cpp:45:17:  [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).
        int e = atoi(str[1].c_str());
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_get_hotspots.cpp:55:32:  [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).
        prev = coldspot(str[0],atoi(str[1].c_str())+1,atoi(str[2].c_str()),-1,"NA");
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_get_hotspots.cpp:55:55:  [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).
        prev = coldspot(str[0],atoi(str[1].c_str())+1,atoi(str[2].c_str()),-1,"NA");
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_get_hotspots.cpp:56:13:  [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).
        s = atoi(str[1].c_str())+1;
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_get_hotspots.cpp:57:13:  [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).
        e = atoi(str[2].c_str());
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:57:43:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:58: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).
                phenotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:83: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).
                    phenotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:84: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).
                    phenotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:143:31:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:144:29:  [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_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:163:32:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_rtc/rtc_read_phenotypes.cpp:164:30:  [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_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_trans/trans_read_phenotypes.cpp:56: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).
                    phenotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_trans/trans_read_phenotypes.cpp:57: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).
                    phenotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_genotypes.cpp:206:29:  [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).
			genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_genotypes.cpp:207:27:  [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).
			genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_genotypes.cpp:342:42:  [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).
                genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_genotypes.cpp:343:40:  [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).
                genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_genotypes.cpp:361:46:  [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).
                    genotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_genotypes.cpp:362:44:  [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).
                    genotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_get_hotspots.cpp:40:17:  [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).
        int e = atoi(str[1].c_str());
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_get_hotspots.cpp:48:34:  [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).
        prev = coldspot_u(str[0],atoi(str[1].c_str())+1,atoi(str[2].c_str()),-1,"NA");
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_get_hotspots.cpp:48:57:  [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).
        prev = coldspot_u(str[0],atoi(str[1].c_str())+1,atoi(str[2].c_str()),-1,"NA");
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_get_hotspots.cpp:49:13:  [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).
        s = atoi(str[1].c_str())+1;
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_get_hotspots.cpp:50:13:  [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).
        e = atoi(str[2].c_str());
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_phenotypes.cpp:62:30:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_phenotypes.cpp:63:28:  [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_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_phenotypes.cpp:118:43:  [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_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_phenotypes.cpp:119: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).
                phenotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_phenotypes.cpp:137: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).
                    phenotype_start.push_back(atoi(tokens[1].c_str()) + 1);
data/qtltools-1.3.1+dfsg/src/mode_union/union_read_phenotypes.cpp:138: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).
                    phenotype_end.push_back(atoi(tokens[2].c_str()));
data/qtltools-1.3.1+dfsg/src/mode_union/union_union.cpp:59:14:  [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).
		int rank = atoi(str[rank_column].c_str());
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_fasta.cpp:35:59:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((!bam_region.isSet() || bam_region.chr == chr) && read ) {
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_fasta.cpp:59:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if ((!bam_region.isSet() || bam_region.chr == chr) && read ) genome[chr].reserve(BUFFER_SIZE);
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_fasta.cpp:62:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (!read || (bam_region.isSet()  && bam_region.chr != chr) ) continue;
data/qtltools-1.3.1+dfsg/src/mode_ase/ase_read_fasta.cpp:69:56:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((!bam_region.isSet() || bam_region.chr == chr) && read ) {
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_data.h:39:25:  [1] (buffer) mismatch:
  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.
	unsigned long int mapQ,mismatch,unmapped,unpaired,dup,notexon,good,total,exonicint,exonicint_multi,secondary,failqc,merged,noNM,checkedNM,nonIntNM,multiNM,unmatched;
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_main.cpp:181:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    		while(fin.read( (char *) buffer, bufferSize) || (readCount = fin.gcount()) != 0 )  {
data/qtltools-1.3.1+dfsg/src/mode_quan/quan_writeResults.cpp:197:133:  [1] (buffer) mismatch:
  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.
	fdo << "filtered_mismatches_greater_than_" << filter.max_mismatch_count << "_" << filter.max_mismatch_count_total << "\t" << stats.mismatch << endl;

ANALYSIS SUMMARY:

Hits = 115
Lines analyzed = 21281 in approximately 0.80 seconds (26467 lines/second)
Physical Source Lines of Code (SLOC) = 15372
Hits@level = [0]   1 [1]   7 [2] 107 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+] 116 [1+] 115 [2+] 108 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 7.54619 [1+] 7.48113 [2+] 7.02576 [3+] 0.0650533 [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.