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/stacks-2.54+dfsg/src/DNANSeq.cc
Examining data/stacks-2.54+dfsg/src/cstacks.h
Examining data/stacks-2.54+dfsg/src/nucleotides.cc
Examining data/stacks-2.54+dfsg/src/file_io.cc
Examining data/stacks-2.54+dfsg/src/process_radtags.cc
Examining data/stacks-2.54+dfsg/src/mstack.cc
Examining data/stacks-2.54+dfsg/src/write.h
Examining data/stacks-2.54+dfsg/src/gzFasta.h
Examining data/stacks-2.54+dfsg/src/nucleotides.h
Examining data/stacks-2.54+dfsg/src/cmb.h
Examining data/stacks-2.54+dfsg/src/Hwp.h
Examining data/stacks-2.54+dfsg/src/ordered.h
Examining data/stacks-2.54+dfsg/src/populations.cc
Examining data/stacks-2.54+dfsg/src/aln_utils.h
Examining data/stacks-2.54+dfsg/src/log_utils.h
Examining data/stacks-2.54+dfsg/src/export_formats.cc
Examining data/stacks-2.54+dfsg/src/phasedstacks.h
Examining data/stacks-2.54+dfsg/src/PopSum.cc
Examining data/stacks-2.54+dfsg/src/genotype_dictionaries.h
Examining data/stacks-2.54+dfsg/src/renz.cc
Examining data/stacks-2.54+dfsg/src/Seq.h
Examining data/stacks-2.54+dfsg/src/export_formats.h
Examining data/stacks-2.54+dfsg/src/clean.cc
Examining data/stacks-2.54+dfsg/src/ustacks.cc
Examining data/stacks-2.54+dfsg/src/bootstrap.h
Examining data/stacks-2.54+dfsg/src/mstack.h
Examining data/stacks-2.54+dfsg/src/stacks.h
Examining data/stacks-2.54+dfsg/src/clone_filter.cc
Examining data/stacks-2.54+dfsg/src/locus_readers.h
Examining data/stacks-2.54+dfsg/src/GappedAln.h
Examining data/stacks-2.54+dfsg/src/BamI.h
Examining data/stacks-2.54+dfsg/src/process_radtags.h
Examining data/stacks-2.54+dfsg/src/PopSum.h
Examining data/stacks-2.54+dfsg/src/smoothing.h
Examining data/stacks-2.54+dfsg/src/models.h
Examining data/stacks-2.54+dfsg/src/kmers.cc
Examining data/stacks-2.54+dfsg/src/ustacks.h
Examining data/stacks-2.54+dfsg/src/mapping_utils.cc
Examining data/stacks-2.54+dfsg/src/kmers.h
Examining data/stacks-2.54+dfsg/src/write.cc
Examining data/stacks-2.54+dfsg/src/gstacks.cc
Examining data/stacks-2.54+dfsg/src/mapping_utils.h
Examining data/stacks-2.54+dfsg/src/DNANSeq.h
Examining data/stacks-2.54+dfsg/src/clone_filter.h
Examining data/stacks-2.54+dfsg/src/genotype_dictionaries.cc
Examining data/stacks-2.54+dfsg/src/mst.h
Examining data/stacks-2.54+dfsg/src/FastaI.h
Examining data/stacks-2.54+dfsg/src/catalog_utils.h
Examining data/stacks-2.54+dfsg/src/DNASeq.h
Examining data/stacks-2.54+dfsg/src/gzFastq.h
Examining data/stacks-2.54+dfsg/src/BustardI.h
Examining data/stacks-2.54+dfsg/src/sstacks.h
Examining data/stacks-2.54+dfsg/src/Tsv.h
Examining data/stacks-2.54+dfsg/src/kmer_filter.cc
Examining data/stacks-2.54+dfsg/src/kmer_filter.h
Examining data/stacks-2.54+dfsg/src/Alignment.h
Examining data/stacks-2.54+dfsg/src/DNASeq4.cc
Examining data/stacks-2.54+dfsg/src/sql_utilities.h
Examining data/stacks-2.54+dfsg/src/BowtieI.h
Examining data/stacks-2.54+dfsg/src/constants.cc
Examining data/stacks-2.54+dfsg/src/Seq.cc
Examining data/stacks-2.54+dfsg/src/renz.h
Examining data/stacks-2.54+dfsg/src/populations.h
Examining data/stacks-2.54+dfsg/src/DNASeq4.h
Examining data/stacks-2.54+dfsg/src/SamI.h
Examining data/stacks-2.54+dfsg/src/locus.h
Examining data/stacks-2.54+dfsg/src/phasedstacks.cc
Examining data/stacks-2.54+dfsg/src/process_shortreads.cc
Examining data/stacks-2.54+dfsg/src/smoothing_utils.h
Examining data/stacks-2.54+dfsg/src/SuffixTree.cc
Examining data/stacks-2.54+dfsg/src/aln_utils.cc
Examining data/stacks-2.54+dfsg/src/input.cc
Examining data/stacks-2.54+dfsg/src/PopMap.h
Examining data/stacks-2.54+dfsg/src/MetaPopInfo.cc
Examining data/stacks-2.54+dfsg/src/cstacks.cc
Examining data/stacks-2.54+dfsg/src/tsv2bam.cc
Examining data/stacks-2.54+dfsg/src/Vcf.cc
Examining data/stacks-2.54+dfsg/src/gzFasta.cc
Examining data/stacks-2.54+dfsg/src/sstacks.cc
Examining data/stacks-2.54+dfsg/src/SuffixTree.h
Examining data/stacks-2.54+dfsg/src/mst.cc
Examining data/stacks-2.54+dfsg/src/locus.cc
Examining data/stacks-2.54+dfsg/src/process_shortreads.h
Examining data/stacks-2.54+dfsg/src/FastqI.h
Examining data/stacks-2.54+dfsg/src/gstacks.h
Examining data/stacks-2.54+dfsg/src/stacks.cc
Examining data/stacks-2.54+dfsg/src/input.h
Examining data/stacks-2.54+dfsg/src/MetaPopInfo.h
Examining data/stacks-2.54+dfsg/src/BamUnalignedI.h
Examining data/stacks-2.54+dfsg/src/cmb.cc
Examining data/stacks-2.54+dfsg/src/Hwp.cc
Examining data/stacks-2.54+dfsg/src/catalog_utils.cc
Examining data/stacks-2.54+dfsg/src/sql_utilities.cc
Examining data/stacks-2.54+dfsg/src/debruijn.h
Examining data/stacks-2.54+dfsg/src/utils.cc
Examining data/stacks-2.54+dfsg/src/BamI.cc
Examining data/stacks-2.54+dfsg/src/file_io.h
Examining data/stacks-2.54+dfsg/src/DNASeq.cc
Examining data/stacks-2.54+dfsg/src/Vcf.h
Examining data/stacks-2.54+dfsg/src/models.cc
Examining data/stacks-2.54+dfsg/src/debruijn.cc
Examining data/stacks-2.54+dfsg/src/log_utils.cc
Examining data/stacks-2.54+dfsg/src/constants.h
Examining data/stacks-2.54+dfsg/src/clean.h
Examining data/stacks-2.54+dfsg/src/utils.h

FINAL RESULTS:

data/stacks-2.54+dfsg/src/BamI.cc:68:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy((char*)p, name.c_str());
data/stacks-2.54+dfsg/src/BamI.cc:96:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(h_->text, text);
data/stacks-2.54+dfsg/src/BustardI.h:67:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->seq,  parts[8].c_str());
data/stacks-2.54+dfsg/src/BustardI.h:69:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->qual, parts[9].c_str());
data/stacks-2.54+dfsg/src/BustardI.h:72:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(s->id, "@%s:%s:%s:%s:%s#%s/%s",
data/stacks-2.54+dfsg/src/BustardI.h:98:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.seq,  parts[2].c_str());
data/stacks-2.54+dfsg/src/BustardI.h:99:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.qual, parts[3].c_str());
data/stacks-2.54+dfsg/src/BustardI.h:101:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(s.id, "@%s:%s:%s:%s:%s#%s/%s",
data/stacks-2.54+dfsg/src/FastaI.h:96:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.id, this->line + 1);
data/stacks-2.54+dfsg/src/FastaI.h:121:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.seq, this->buf.c_str());
data/stacks-2.54+dfsg/src/FastqI.h:61:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->id, this->line + 1);
data/stacks-2.54+dfsg/src/FastqI.h:76:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->seq, this->line);
data/stacks-2.54+dfsg/src/FastqI.h:100:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->qual, this->line);
data/stacks-2.54+dfsg/src/FastqI.h:135:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.id, this->line + 1);
data/stacks-2.54+dfsg/src/FastqI.h:149:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.seq, this->line);
data/stacks-2.54+dfsg/src/FastqI.h:172:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.qual, this->line);
data/stacks-2.54+dfsg/src/PopMap.h:80:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(this->gtype, g.c_str());
data/stacks-2.54+dfsg/src/Seq.cc:59:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(id, other.id);
data/stacks-2.54+dfsg/src/Seq.cc:72:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(seq, other.seq);
data/stacks-2.54+dfsg/src/Seq.cc:79:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(qual, other.qual);
data/stacks-2.54+dfsg/src/Seq.cc:85:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(loc_str, other.loc_str);
data/stacks-2.54+dfsg/src/Seq.cc:99:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(this->id, id);
data/stacks-2.54+dfsg/src/Seq.cc:103:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(this->seq, seq);
data/stacks-2.54+dfsg/src/Seq.cc:133:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(this->loc_str, "%s|%d|%c", chr, bp, strand == strand_plus ? '+' : '-');
data/stacks-2.54+dfsg/src/Seq.h:46:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(chr_, other.chr_);
data/stacks-2.54+dfsg/src/Seq.h:54:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(this->chr_,  chr);
data/stacks-2.54+dfsg/src/Seq.h:60:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(this->chr_,  chr);
data/stacks-2.54+dfsg/src/Seq.h:73:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(chr_,  ochr);
data/stacks-2.54+dfsg/src/clean.cc:142:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(r->machine, p);
data/stacks-2.54+dfsg/src/clean.cc:266:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(r->machine, p);
data/stacks-2.54+dfsg/src/clean.cc:570:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(href->se_bc, b.c_str());
data/stacks-2.54+dfsg/src/clean.cc:576:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(href->pe_bc, b.c_str());
data/stacks-2.54+dfsg/src/clean.h:322:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(bc_1, bc.se.c_str());
data/stacks-2.54+dfsg/src/clean.h:323:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(bc_2, bc.pe.c_str());
data/stacks-2.54+dfsg/src/clean.h:372:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(href_1->se_bc, bc_1);
data/stacks-2.54+dfsg/src/clean.h:373:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(href_2->pe_bc, bc_2);
data/stacks-2.54+dfsg/src/clean.h:375:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(href_1->se_bc, bc_1);
data/stacks-2.54+dfsg/src/clean.h:376:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(href_1->pe_bc, bc_2);
data/stacks-2.54+dfsg/src/clean.h:389:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(href_1->se_bc, bc_1);
data/stacks-2.54+dfsg/src/clean.h:397:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(href_2->pe_bc, bc_2);
data/stacks-2.54+dfsg/src/clean.h:399:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(href_1->pe_bc, bc_2);
data/stacks-2.54+dfsg/src/clone_filter.cc:266:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(hash_key, s_1->seq);
data/stacks-2.54+dfsg/src/export_formats.cc:1054:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(seq, loc->cloc->con);
data/stacks-2.54+dfsg/src/export_formats.cc:1127:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(seq, loc->cloc->con);
data/stacks-2.54+dfsg/src/export_formats.cc:2232:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(seq, cloc->con);
data/stacks-2.54+dfsg/src/gzFasta.cc:112:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.id, this->line + 1);
data/stacks-2.54+dfsg/src/gzFasta.cc:140:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.seq, this->buf.c_str());
data/stacks-2.54+dfsg/src/gzFastq.h:90:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->id, this->line + 1);
data/stacks-2.54+dfsg/src/gzFastq.h:106:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->seq, this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:133:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s->qual, this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:172:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.id, this->line + 1);
data/stacks-2.54+dfsg/src/gzFastq.h:188:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.seq, this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:214:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s.qual, this->line);
data/stacks-2.54+dfsg/src/input.cc:115:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(*line, buf);
data/stacks-2.54+dfsg/src/input.cc:121:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(*line, buf);
data/stacks-2.54+dfsg/src/input.cc:154:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(*line, buf);
data/stacks-2.54+dfsg/src/input.cc:160:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(*line, buf);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1018:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(kmer, parts[1].c_str());
data/stacks-2.54+dfsg/src/kmer_filter.cc:1025:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(kmer, parts[0].c_str());
data/stacks-2.54+dfsg/src/kmer_filter.cc:1034:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(hash_key, kmer);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1129:21:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                    strcpy(hash_key, kmer);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1273:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(hash_key, kmer);
data/stacks-2.54+dfsg/src/locus.cc:43:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(this->model, templ.model);
data/stacks-2.54+dfsg/src/locus.cc:47:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(this->con, templ.con);
data/stacks-2.54+dfsg/src/locus.cc:52:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(c, templ.comp[i]);
data/stacks-2.54+dfsg/src/locus.cc:57:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(c, templ.reads[i]);
data/stacks-2.54+dfsg/src/locus.cc:91:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(this->con, seq);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1494:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(col_str, q);
data/stacks-2.54+dfsg/src/process_radtags.cc:1249:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(adapter_1, optarg);
data/stacks-2.54+dfsg/src/process_radtags.cc:1254:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(adapter_2, optarg);
data/stacks-2.54+dfsg/src/process_shortreads.cc:1006:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(adapter_1, optarg);
data/stacks-2.54+dfsg/src/process_shortreads.cc:1011:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(adapter_2, optarg);
data/stacks-2.54+dfsg/src/sql_utilities.cc:72:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(m->haplotype, parts[3].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:75:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(m->cigar, parts[5].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:145:21:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                    strcpy(loci[id]->model, parts[5].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:157:29:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                            strcpy(read, parts[5].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:162:25:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                        strcpy(read_id, parts[4].c_str());
data/stacks-2.54+dfsg/src/stacks.cc:76:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(f, id);
data/stacks-2.54+dfsg/src/stacks.h:145:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(copy, read_name);
data/stacks-2.54+dfsg/src/stacks.h:239:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(this->model, model);
data/stacks-2.54+dfsg/src/stacks.h:299:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(copy, readname);
data/stacks-2.54+dfsg/src/tsv2bam.cc:625:17:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            if (access((pe_reads_dir + samples.at(0) + ".2" + e).c_str(), F_OK) == 0) {
data/stacks-2.54+dfsg/src/ustacks.cc:2739:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(id, c.id);
data/stacks-2.54+dfsg/src/bootstrap.h:157:61:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                    index = (int) (this->stats[0].size() * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/bootstrap.h:279:61:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                    index = (int) (this->stats[0].size() * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/clone_filter.cc:1129:13:  [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.
        c = getopt_long(argc, argv, "hvDPuUVWXxYZi:y:f:p:1:2:o:O:L:R:", long_options, &option_index);
data/stacks-2.54+dfsg/src/cstacks.cc:1850:17:  [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.
        int c = getopt_long(argc, argv, "hvuRGX:x:o:s:c:p:n:k:P:M:", long_options, &option_index);
data/stacks-2.54+dfsg/src/gstacks.cc:2916:13:  [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.
        c = getopt_long(argc, argv, "hqP:I:B:S:s:M:O:W:t:m:", long_options, &long_options_i);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1658:13:  [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.
        c = getopt_long(argc, argv, "hvRADkP:N:I:w:r:K:F:G:M:m:i:y:f:o:t:p:1:2:", long_options, &option_index);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1843:13:  [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.
        c = getopt_long(argc, argv, "hvZHAb:M:t:P:S:p:a:B:T:", long_options, &option_index);
data/stacks-2.54+dfsg/src/populations.cc:128:5:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srandom(time(NULL));
data/stacks-2.54+dfsg/src/populations.cc:3059:59:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                index_3 = (int) (allele_samples.size() * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/populations.cc:3080:50:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                    pos     = (int) (win_size * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/populations.cc:3083:63:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                    index_3 = (int) (allele_samples.size() * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/populations.cc:3215:59:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                index_2 = (int) (allele_samples.size() * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/populations.cc:3223:50:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                    pos     = (int) (win_size * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/populations.cc:3225:63:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                    index_2 = (int) (allele_samples.size() * (random() / (RAND_MAX + 1.0)));
data/stacks-2.54+dfsg/src/populations.cc:3686:17:  [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.
        int c = getopt_long(argc, argv, "ACDFHJKLNSTUV:YZ123456dhjklnqva:c:e:f:i:o:p:r:t:u:w:B:I:M:O:P:R:Q:W:", long_options, NULL);
data/stacks-2.54+dfsg/src/process_radtags.cc:898:20:  [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.
        char* rv = realpath(in_path_1.c_str(), abspath);
data/stacks-2.54+dfsg/src/process_radtags.cc:1116:13:  [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.
        c = getopt_long(argc, argv, "HuUVWxYZhvRFIcqrDPmB:C:i:y:f:o:t:e:z:b:1:2:p:s:w:E:L:A:G:T:", long_options, &option_index);
data/stacks-2.54+dfsg/src/process_shortreads.cc:879:13:  [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.
        c = getopt_long(argc, argv, "hHvcqrINFuVWxYZOPmDi:y:f:o:t:B:C:b:1:2:p:s:w:E:L:A:G:T:", long_options, &option_index);
data/stacks-2.54+dfsg/src/sstacks.cc:1312:17:  [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.
        int c = getopt_long(argc, argv, "hgGxuvs:c:o:p:P:M:", long_options, &option_index);
data/stacks-2.54+dfsg/src/tsv2bam.cc:535:13:  [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.
        c = getopt_long(argc, argv, "hqt:P:M:s:R:", long_options, &long_options_i);
data/stacks-2.54+dfsg/src/ustacks.cc:2802:13:  [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.
        c = getopt_long(argc, argv, "GhHvdrgRA:L:U:f:o:s:i:m:e:p:t:M:N:K:k:T:X:x:", long_options, &option_index);
data/stacks-2.54+dfsg/src/BamI.cc:77: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(p, seq.vdata(), seq.nbytes());
data/stacks-2.54+dfsg/src/BamI.cc:82: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(p, rg.c_str(), rg.length()+1);
data/stacks-2.54+dfsg/src/BowtieI.h:74: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).
    int bp = strand == strand_plus ? atoi(parts[3].c_str()) : atoi(parts[3].c_str()) + parts[4].length();
data/stacks-2.54+dfsg/src/BowtieI.h:74:63:  [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 bp = strand == strand_plus ? atoi(parts[3].c_str()) : atoi(parts[3].c_str()) + parts[4].length();
data/stacks-2.54+dfsg/src/DNANSeq.cc:81: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(s, other.s, nbytes());
data/stacks-2.54+dfsg/src/DNANSeq.cc:89: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(s, other.s, nbytes());
data/stacks-2.54+dfsg/src/GappedAln.h:688: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[id_len];
data/stacks-2.54+dfsg/src/GappedAln.h:748:17:  [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, "%dM", cnt);
data/stacks-2.54+dfsg/src/GappedAln.h:756:17:  [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, "%dD", cnt);
data/stacks-2.54+dfsg/src/GappedAln.h:766:17:  [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, "%dI", cnt);
data/stacks-2.54+dfsg/src/GappedAln.h:805: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[id_len];
data/stacks-2.54+dfsg/src/GappedAln.h:870:13:  [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, "%dS", (int) query_start);
data/stacks-2.54+dfsg/src/GappedAln.h:889:17:  [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, "%dM", cnt);
data/stacks-2.54+dfsg/src/GappedAln.h:897:17:  [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, "%dD", cnt);
data/stacks-2.54+dfsg/src/GappedAln.h:907:17:  [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, "%dI", cnt);
data/stacks-2.54+dfsg/src/GappedAln.h:919:13:  [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, "%dS", (int) query.length() - this->_max_score_m);
data/stacks-2.54+dfsg/src/GappedAln.h:942: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[id_len];
data/stacks-2.54+dfsg/src/GappedAln.h:957:16:  [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).
        dist = atoi(buf);
data/stacks-2.54+dfsg/src/Hwp.cc:367: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[id_len];
data/stacks-2.54+dfsg/src/MetaPopInfo.cc:75: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 line[max_len];
data/stacks-2.54+dfsg/src/PopSum.cc:591: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 nuc[2];
data/stacks-2.54+dfsg/src/PopSum.cc:1119: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 nucs[4];
data/stacks-2.54+dfsg/src/PopSum.cc:2328:8:  [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).
    fh.open(file.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/SamI.h:87:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    flag = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/SamI.h:123:36:  [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 bp = bam_find_start_bp(atoi(parts[3].c_str()), strand, cigar);
data/stacks-2.54+dfsg/src/Seq.h:31:18:  [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.
    static const char empty_str[1];
data/stacks-2.54+dfsg/src/Tsv.h:65:79:  [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 = Seq(id.c_str(), parts[2].c_str(), parts[3].c_str(), parts[0].c_str(), atoi(parts[1].c_str()), strand_plus);
data/stacks-2.54+dfsg/src/Vcf.cc:29: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 date[9];
data/stacks-2.54+dfsg/src/Vcf.cc:290:12:  [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).
VcfParser::open(string &path) {
data/stacks-2.54+dfsg/src/Vcf.cc:291:17:  [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).
    this->file_.open(path);
data/stacks-2.54+dfsg/src/Vcf.h:136:62:  [2] (integer) atol:
  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).
         size_t pos()     const {assert(has_infos()); return atol(data() + pos_) - 1;} // 0-based.
data/stacks-2.54+dfsg/src/Vcf.h:236:9:  [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).
    int open(string &path);
data/stacks-2.54+dfsg/src/Vcf.h:356: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 s[32];
data/stacks-2.54+dfsg/src/Vcf.h:357:18:  [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.
    size_t len = sprintf(s, "%zu", pos0 + 1);
data/stacks-2.54+dfsg/src/Vcf.h:395:9:  [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 s[32];
data/stacks-2.54+dfsg/src/Vcf.h:396:22:  [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.
        size_t len = sprintf(s, "%ld", phred_qual);
data/stacks-2.54+dfsg/src/clean.cc:150: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).
            r->run = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:161:23:  [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->lane = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:168:23:  [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->tile = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:175: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).
            r->x = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:182: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).
            r->y = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:273:23:  [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->lane = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:280:23:  [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->tile = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:287: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).
            r->x = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:294: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).
            r->y = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:301: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).
            r->index = atoi(p);
data/stacks-2.54+dfsg/src/clean.cc:539: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   bc[id_len];
data/stacks-2.54+dfsg/src/clean.h:320: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  bc_1[id_len];
data/stacks-2.54+dfsg/src/clean.h:321: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  bc_2[id_len];
data/stacks-2.54+dfsg/src/clone_filter.cc:185: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/stacks-2.54+dfsg/src/clone_filter.cc:186: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, "%0.2f%%", ((double) (counters["total"] - counters["red_reads"]) / (double) counters["total"]) * 100);
data/stacks-2.54+dfsg/src/clone_filter.cc:336:18:  [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).
        out_fh_1.open(path_1.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:352:18:  [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).
        out_fh_2.open(path_2.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:371: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).
            discard_fh_1.open(path_1.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:386: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).
            discard_fh_2.open(path_2.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:579:18:  [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).
        out_fh_1.open(path_1.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:595:18:  [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).
        out_fh_2.open(path_2.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:615: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).
            discard_fh_1.open(path_1.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:631: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).
            discard_fh_2.open(path_2.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:919:18:  [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).
        out_fh_1.open(path_1.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/clone_filter.cc:939: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).
            discard_fh_1.open(path_1.c_str(), ifstream::out);
data/stacks-2.54+dfsg/src/cstacks.cc:178: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 id[id_len];
data/stacks-2.54+dfsg/src/cstacks.cc:1021:9:  [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 id[id_len];
data/stacks-2.54+dfsg/src/cstacks.cc:1090:14:  [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).
        tags.open(tag_file.c_str());
data/stacks-2.54+dfsg/src/cstacks.cc:1091:14:  [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).
        snps.open(snp_file.c_str());
data/stacks-2.54+dfsg/src/cstacks.cc:1092:14:  [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).
        alle.open(all_file.c_str());
data/stacks-2.54+dfsg/src/cstacks.cc:1106: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         date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:110: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   line[max_len];
data/stacks-2.54+dfsg/src/export_formats.cc:160:17:  [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).
SumstatsExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:166:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:286:17:  [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).
HapstatsExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:292:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:383:22:  [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).
SnpDivergenceExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:569:22:  [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).
HapDivergenceExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:841:22:  [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).
RawHaplotypesExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:846:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:909:16:  [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).
MarkersExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:914:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:954:18:  [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).
FastaLociExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:959:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:975: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:1016: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:1026:17:  [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).
FastaRawExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:1031:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:1093: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:1103:21:  [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).
FastaSamplesExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:1108:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:1237:16:  [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).
GenePopExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:1249:18:  [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).
    this->_tmpfh.open(this->tmp_path());
data/stacks-2.54+dfsg/src/export_formats.cc:1352: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:1357:15:  [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).
    this->_fh.open(this->_path.c_str());
data/stacks-2.54+dfsg/src/export_formats.cc:1402: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).
GenePopHapsExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:1406:15:  [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).
    this->_fh.open(this->_path);
data/stacks-2.54+dfsg/src/export_formats.cc:1408:18:  [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).
    this->_tmpfh.open(this->tmp_path());
data/stacks-2.54+dfsg/src/export_formats.cc:1480: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:1536:18:  [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).
StructureExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:1549:18:  [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).
    this->_tmpfh.open(this->_tmp_path);
data/stacks-2.54+dfsg/src/export_formats.cc:1659: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:1664:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:1672: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).
    this->_intmpfh.open(this->_tmp_path.c_str(), ofstream::in);
data/stacks-2.54+dfsg/src/export_formats.cc:1702:25:  [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).
FineRADStructureExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:1708:15:  [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).
    this->_fh.open(this->_path.c_str());
data/stacks-2.54+dfsg/src/export_formats.cc:1856:15:  [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).
PhylipExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:1872:18:  [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).
    this->_tmpfh.open(this->_tmp_path);
data/stacks-2.54+dfsg/src/export_formats.cc:1878:18:  [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).
    this->_logfh.open(this->_log_path);
data/stacks-2.54+dfsg/src/export_formats.cc:1885: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2087: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2092:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:2095: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).
    this->_intmpfh.open(this->_tmp_path.c_str(), ofstream::in);
data/stacks-2.54+dfsg/src/export_formats.cc:2140:21:  [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).
PhylipVarAllExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:2149:15:  [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).
    this->_fh.open(this->_path);
data/stacks-2.54+dfsg/src/export_formats.cc:2157:18:  [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).
    this->_parfh.open(this->_partition_path, ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:2164:18:  [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).
    this->_logfh.open(this->_log_path);
data/stacks-2.54+dfsg/src/export_formats.cc:2171: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2189: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   s[id_len];
data/stacks-2.54+dfsg/src/export_formats.cc:2197: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(s, "% 11d", 0);
data/stacks-2.54+dfsg/src/export_formats.cc:2303: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2318: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   s[id_len];
data/stacks-2.54+dfsg/src/export_formats.cc:2319: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(s, "%11lu", this->_seq_len);
data/stacks-2.54+dfsg/src/export_formats.cc:2335:13:  [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).
HzarExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:2349:18:  [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).
    this->_tmpfh.open(this->_tmp_path);
data/stacks-2.54+dfsg/src/export_formats.cc:2403:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:2409: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).
    this->_intmpfh.open(this->_tmp_path.c_str(), ofstream::in);
data/stacks-2.54+dfsg/src/export_formats.cc:2417: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   line[max_len];
data/stacks-2.54+dfsg/src/export_formats.cc:2475: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2509:12:  [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).
VcfExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:2538: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 freq_alt[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2539: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(freq_alt, "%0.3f", 1 - t->nucs[col].p_freq);
data/stacks-2.54+dfsg/src/export_formats.cc:2607:16:  [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).
VcfHapsExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:2694:14:  [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).
PlinkExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:2707:23:  [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).
    this->_markers_fh.open(this->_markers_path);
data/stacks-2.54+dfsg/src/export_formats.cc:2717:18:  [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).
    this->_tmpfh.open(this->tmp_path());
data/stacks-2.54+dfsg/src/export_formats.cc:2733: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2913: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:2918:15:  [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).
    this->_fh.open(this->_path.c_str());
data/stacks-2.54+dfsg/src/export_formats.cc:2962:16:  [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).
TreemixExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:2971:13:  [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).
    _writer.open(_path);
data/stacks-2.54+dfsg/src/export_formats.cc:2979: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:3040:16:  [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).
JoinMapExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:3060:18:  [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).
    this->_tmpfh.open(this->_tmp_path);
data/stacks-2.54+dfsg/src/export_formats.cc:3150: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       date[32], date2[32];
data/stacks-2.54+dfsg/src/export_formats.cc:3156: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).
    this->_intmpfh.open(this->_tmp_path.c_str(), ofstream::in);
data/stacks-2.54+dfsg/src/export_formats.cc:3159:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:3210: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   line[max_len];
data/stacks-2.54+dfsg/src/export_formats.cc:3279:15:  [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).
OneMapExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:3299:18:  [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).
    this->_tmpfh.open(this->_tmp_path);
data/stacks-2.54+dfsg/src/export_formats.cc:3375: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:3380: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).
    this->_intmpfh.open(this->_tmp_path.c_str(), ofstream::in);
data/stacks-2.54+dfsg/src/export_formats.cc:3383:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:3394: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   line[max_len];
data/stacks-2.54+dfsg/src/export_formats.cc:3456:13:  [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).
rQTLExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:3476:18:  [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).
    this->_tmpfh.open(this->_tmp_path);
data/stacks-2.54+dfsg/src/export_formats.cc:3576: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       date[32], date2[32];
data/stacks-2.54+dfsg/src/export_formats.cc:3582: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).
    this->_intmpfh.open(this->_tmp_path.c_str(), ofstream::in);
data/stacks-2.54+dfsg/src/export_formats.cc:3585:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:3634:17:  [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).
MapMakerExport::open(const MetaPopInfo *mpopi)
data/stacks-2.54+dfsg/src/export_formats.cc:3654:18:  [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).
    this->_tmpfh.open(this->_tmp_path);
data/stacks-2.54+dfsg/src/export_formats.cc:3734: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       date[32];
data/stacks-2.54+dfsg/src/export_formats.cc:3739: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).
    this->_intmpfh.open(this->_tmp_path.c_str(), ofstream::in);
data/stacks-2.54+dfsg/src/export_formats.cc:3742:15:  [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).
    this->_fh.open(this->_path.c_str(), ofstream::out);
data/stacks-2.54+dfsg/src/export_formats.cc:3766: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   line[max_len];
data/stacks-2.54+dfsg/src/export_formats.h:52:18:  [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).
    virtual int  open(const MetaPopInfo *) = 0;
data/stacks-2.54+dfsg/src/export_formats.h:105: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:119: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:134: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:149: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:169: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:197: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:218: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:235: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:252: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:273: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:291: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:308: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:342: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:358: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:376: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).
    int  open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:390:9:  [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).
    int open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:404:9:  [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).
    int open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:416:9:  [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).
    int open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:430:9:  [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).
    int open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:441:9:  [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).
    int open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:463:12:  [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).
    int    open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:494:12:  [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).
    int    open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:516:12:  [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).
    int    open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/export_formats.h:538:12:  [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).
    int    open(const MetaPopInfo *mpopi);
data/stacks-2.54+dfsg/src/file_io.cc:655: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     line[id_len];
data/stacks-2.54+dfsg/src/gstacks.cc:214:17:  [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).
        o_aln_f.open(o_aln_path);
data/stacks-2.54+dfsg/src/gstacks.cc:221:23:  [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).
        o_hapgraphs_f.open(o_hapgraphs_path);
data/stacks-2.54+dfsg/src/gstacks.cc:1290: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 c[id_len];
data/stacks-2.54+dfsg/src/gstacks.cc:1504:13:  [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[id_len];
data/stacks-2.54+dfsg/src/gstacks.cc:2390: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 loc_id[16];
data/stacks-2.54+dfsg/src/gstacks.cc:2391: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(loc_id, "%d", loc_.id);
data/stacks-2.54+dfsg/src/gstacks.cc:2622: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 cstr_buf[32];
data/stacks-2.54+dfsg/src/gstacks.cc:2628: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(cstr_buf, "%u", p.bp+1);
data/stacks-2.54+dfsg/src/gstacks.cc:2637: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(cstr_buf, "%zu", n_remaining_samples);
data/stacks-2.54+dfsg/src/gstacks.cc:2642: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(cstr_buf, "%zu", samples_w_reads.size() - n_remaining_samples);
data/stacks-2.54+dfsg/src/gstacks.cc:2649: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(cstr_buf, "%zu", loc_.olap_length);
data/stacks-2.54+dfsg/src/gstacks.cc:2975:25:  [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).
            km_length = atoi(optarg);
data/stacks-2.54+dfsg/src/gstacks.cc:2993: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).
            min_km_count = atoi(optarg);
data/stacks-2.54+dfsg/src/gstacks.cc:3035: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).
                phasing_cooccurrences_thr_range.first = atoi(optarg);
data/stacks-2.54+dfsg/src/gstacks.cc:3036:58:  [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).
                phasing_cooccurrences_thr_range.second = atoi(strchr(optarg, ',') + 1);
data/stacks-2.54+dfsg/src/gzFasta.cc:27:11:  [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).
    this->open(path);
data/stacks-2.54+dfsg/src/gzFasta.cc:31: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).
GzFasta::open(const char *path)
data/stacks-2.54+dfsg/src/gzFasta.h:40: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).
    void open(string path) { this->open(path.c_str()); }
data/stacks-2.54+dfsg/src/gzFasta.h:40:36:  [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 path) { this->open(path.c_str()); }
data/stacks-2.54+dfsg/src/gzFasta.h:41: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).
    void open(const char *path);
data/stacks-2.54+dfsg/src/input.cc:38:14:  [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).
    this->fh.open(path, ifstream::in);
data/stacks-2.54+dfsg/src/input.cc:100: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[max_len];
data/stacks-2.54+dfsg/src/input.cc:132: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[max_len];
data/stacks-2.54+dfsg/src/input.h:43: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     line[max_len];
data/stacks-2.54+dfsg/src/kmer_filter.cc:983: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  kmer[id_len];
data/stacks-2.54+dfsg/src/kmer_filter.cc:984: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  line[max_len];
data/stacks-2.54+dfsg/src/kmers.cc:148:26:  [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 **strings = new char * [range];
data/stacks-2.54+dfsg/src/locus_readers.h:49:50:  [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 target2id(size_t target_i) const {return atoi(bam_fs_[0]->h().chrom_str(target_i));}
data/stacks-2.54+dfsg/src/locus_readers.h:160: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).
    int  open(string &vcf_path);
data/stacks-2.54+dfsg/src/locus_readers.h:403:49:  [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).
                    loci_n_components_.back() = atoi(p+3);
data/stacks-2.54+dfsg/src/locus_readers.h:456:16:  [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).
    readset.id(atoi(bam_fs_[0]->h().chrom_str(loc_i_)));
data/stacks-2.54+dfsg/src/locus_readers.h:987:16:  [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).
VcfCLocReader::open(string &vcf_path)
data/stacks-2.54+dfsg/src/locus_readers.h:989:18:  [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).
    this->vcf_f_.open(vcf_path);
data/stacks-2.54+dfsg/src/log_utils.cc:40: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       date[32];
data/stacks-2.54+dfsg/src/log_utils.cc:208:11:  [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).
        x.open(distribs_path);
data/stacks-2.54+dfsg/src/mapping_utils.cc:530:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "ab");
data/stacks-2.54+dfsg/src/mapping_utils.cc:539:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "bd");
data/stacks-2.54+dfsg/src/mapping_utils.cc:541:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "ad");
data/stacks-2.54+dfsg/src/mapping_utils.cc:550:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "ad");
data/stacks-2.54+dfsg/src/mapping_utils.cc:552:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "ac");
data/stacks-2.54+dfsg/src/mapping_utils.cc:554:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "bd");
data/stacks-2.54+dfsg/src/mapping_utils.cc:556:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "bc");
data/stacks-2.54+dfsg/src/mapping_utils.cc:582:21:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                    strcpy(d[i]->gtype, "bb");
data/stacks-2.54+dfsg/src/mapping_utils.cc:597:25:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                        strcpy(d[i]->gtype, "aa");
data/stacks-2.54+dfsg/src/mst.cc:203: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   label[32];
data/stacks-2.54+dfsg/src/mst.cc:271:13:  [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(label, "%.1f", d);
data/stacks-2.54+dfsg/src/nucleotides.h:61:18:  [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.
    static const char to_ch[16];
data/stacks-2.54+dfsg/src/nucleotides.h:107:18:  [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.
    static const char to_ch[4];
data/stacks-2.54+dfsg/src/phasedstacks.cc:1093:25:  [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 **gtypes = new char *[psum->sample_cnt];
data/stacks-2.54+dfsg/src/phasedstacks.cc:1180: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        line[max_len];
data/stacks-2.54+dfsg/src/phasedstacks.cc:1194:8:  [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).
    fh.open(filepath.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1204: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 bp[id_len];
data/stacks-2.54+dfsg/src/phasedstacks.cc:1275:8:  [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).
    fh.open(filepath.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1405: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 cat_loc_str[id_len], col_str[id_len];
data/stacks-2.54+dfsg/src/phasedstacks.cc:1701: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   line[max_len];
data/stacks-2.54+dfsg/src/phasedstacks.cc:1702: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   pop_id_str[id_len];
data/stacks-2.54+dfsg/src/phasedstacks.cc:1755: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).
        pop_map[parts[0]] = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/phasedstacks.cc:1756: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).
        if (pop_cnts.count(atoi(parts[1].c_str())) == 0)
data/stacks-2.54+dfsg/src/phasedstacks.cc:1757: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).
            pop_cnts[atoi(parts[1].c_str())] = 1;
data/stacks-2.54+dfsg/src/phasedstacks.cc:1759: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).
            pop_cnts[atoi(parts[1].c_str())]++;
data/stacks-2.54+dfsg/src/phasedstacks.cc:1861: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).
            num_threads = atoi(optarg);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1895: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).
            bucket_dist = atoi(optarg);
data/stacks-2.54+dfsg/src/populations.cc:253:21:  [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).
        exports[i]->open((const MetaPopInfo *) &mpopi);
data/stacks-2.54+dfsg/src/populations.cc:517:25:  [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).
    this->_fasta_reader.open(catalog_fa_path);
data/stacks-2.54+dfsg/src/populations.cc:518:24:  [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).
    this->_cloc_reader.open(catalog_vcf_path);
data/stacks-2.54+dfsg/src/populations.cc:697:23:  [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).
    this->_vcf_parser.open(in_path);
data/stacks-2.54+dfsg/src/populations.cc:3308: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     line[id_len];
data/stacks-2.54+dfsg/src/populations.cc:3362: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     line[id_len];
data/stacks-2.54+dfsg/src/populations.cc:3418: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     line[id_len];
data/stacks-2.54+dfsg/src/populations.cc:3485: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     line[id_len];
data/stacks-2.54+dfsg/src/populations.cc:3707: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).
            num_threads = atoi(optarg);
data/stacks-2.54+dfsg/src/populations.cc:3854: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).
            bootstrap_reps = atoi(optarg);
data/stacks-2.54+dfsg/src/process_radtags.cc:897:9:  [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 abspath [PATH_MAX];
data/stacks-2.54+dfsg/src/sql_utilities.cc:20:8:  [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).
    fh.open(f.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/sql_utilities.cc:68: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).
        m->cat_id    = atoi(parts[0].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:69: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).
        m->sample_id = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:70: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).
        m->tag_id    = atoi(parts[2].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:73: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).
        m->depth     = atoi(parts[4].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:111:8:  [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).
    fh.open(f.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/sql_utilities.cc:137:12:  [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).
        fh.open(f.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/sql_utilities.cc:192: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).
        samp_id = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:193: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).
        tag_id  = atoi(parts[2].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:228:8:  [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).
    fh.open(f.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/sql_utilities.cc:261: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).
        samp_id = atoi(parts[0].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:262: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).
        id      = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.cc:265:23:  [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).
        snp->col    = atoi(parts[2].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:79:12:  [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).
        fh.open(f.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/sql_utilities.h:129: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).
        id = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:167:54:  [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).
                        loci[id]->comp_cnt.push_back(atoi(parts[3].c_str()));
data/stacks-2.54+dfsg/src/sql_utilities.h:196: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).
        c->sample_id = atoi(parts[0].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:238:8:  [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).
    fh.open(f.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/sql_utilities.h:273: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).
        id = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:285:23:  [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).
        snp->col    = atoi(parts[2].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:330:8:  [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).
    fh.open(f.c_str(), ifstream::in);
data/stacks-2.54+dfsg/src/sql_utilities.h:365: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).
        id = atoi(parts[1].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:371: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).
            loci[id]->alleles[parts[2]] = atoi(parts[4].c_str());
data/stacks-2.54+dfsg/src/sstacks.cc:184: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 id[id_len];
data/stacks-2.54+dfsg/src/sstacks.cc:709: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 cigar[id_len];
data/stacks-2.54+dfsg/src/sstacks.cc:1219:17:  [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).
        matches.open(out_file.c_str());
data/stacks-2.54+dfsg/src/sstacks.cc:1231: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         date[32];
data/stacks-2.54+dfsg/src/sstacks.cc:1323: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).
            num_threads = atoi(optarg);
data/stacks-2.54+dfsg/src/ustacks.cc:2298: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 strbuf32[32];
data/stacks-2.54+dfsg/src/ustacks.cc:2333: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         date[32];
data/stacks-2.54+dfsg/src/ustacks.cc:2438:13:  [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(strbuf32, "%.2f", (*s)->lratio);
data/stacks-2.54+dfsg/src/ustacks.cc:2452:13:  [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(strbuf32, "%.2f", ((*t).second/total) * 100);
data/stacks-2.54+dfsg/src/ustacks.cc:2502: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 label[32];
data/stacks-2.54+dfsg/src/ustacks.cc:2586:13:  [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(label, "%.1f", d);
data/stacks-2.54+dfsg/src/utils.cc:428:14:  [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).
        ifs_.open(path_);
data/stacks-2.54+dfsg/src/utils.cc:446:22:  [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).
VersatileLineReader::open(string &path)
data/stacks-2.54+dfsg/src/utils.cc:458: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).
        this->ifs_.open(this->path_);
data/stacks-2.54+dfsg/src/utils.cc:507: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(gzbuffer_, old_buffer, gzline_len_ + 1);
data/stacks-2.54+dfsg/src/utils.cc:551:14:  [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).
        ofs_.open(path_);
data/stacks-2.54+dfsg/src/utils.h:272:9:  [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).
    int open(string &);
data/stacks-2.54+dfsg/src/utils.h:425:9:  [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[16];
data/stacks-2.54+dfsg/src/utils.h:426: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", i);
data/stacks-2.54+dfsg/src/utils.h:437:9:  [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/stacks-2.54+dfsg/src/utils.h:438: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, "%ld", i);
data/stacks-2.54+dfsg/src/utils.h:449:9:  [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/stacks-2.54+dfsg/src/utils.h:450: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, "%zu", i);
data/stacks-2.54+dfsg/src/write.cc:33: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 tile[id_len];
data/stacks-2.54+dfsg/src/write.cc:34: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(tile, "%04d", href->tile);
data/stacks-2.54+dfsg/src/write.cc:62: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 tile[id_len];
data/stacks-2.54+dfsg/src/write.cc:63: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(tile, "%04d", href->tile);
data/stacks-2.54+dfsg/src/write.cc:119: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 tile[id_len];
data/stacks-2.54+dfsg/src/write.cc:120: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(tile, "%04d", href->tile);
data/stacks-2.54+dfsg/src/write.cc:155: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 tile[id_len];
data/stacks-2.54+dfsg/src/write.cc:156: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(tile, "%04d", href->tile);
data/stacks-2.54+dfsg/src/BamI.cc:348:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(seq);
data/stacks-2.54+dfsg/src/BamI.cc:375:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, seq + k, buf_size - 1);
data/stacks-2.54+dfsg/src/BamI.cc:377:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            buf_len         = strlen(buf);
data/stacks-2.54+dfsg/src/BamI.cc:402:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, seq + k, buf_size - 1);
data/stacks-2.54+dfsg/src/BamI.cc:404:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            buf_len           = strlen(buf);
data/stacks-2.54+dfsg/src/BamI.h:128:74:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    explicit BamHeader(const BamHeader& other) : BamHeader(other.text(), strlen(other.text())) {}
data/stacks-2.54+dfsg/src/BamI.h:336:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        *ptr += strlen((const char*)*ptr) + 1;
data/stacks-2.54+dfsg/src/FastaI.h:79:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastaI.h:105:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastaI.h:114:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastqI.h:53:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastqI.h:60:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    s->id = new char[strlen(this->line) + 1];
data/stacks-2.54+dfsg/src/FastqI.h:72:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastqI.h:96:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastqI.h:129:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastqI.h:146:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/FastqI.h:169:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/GappedAln.h:955:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, p, q - p);
data/stacks-2.54+dfsg/src/MetaPopInfo.cc:79:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(line);
data/stacks-2.54+dfsg/src/PopMap.h:334:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
                    strncpy(d->obshap[0], "consensus", 10);
data/stacks-2.54+dfsg/src/PopSum.cc:51:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(cloc->con);
data/stacks-2.54+dfsg/src/SamI.h:73:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(line);
data/stacks-2.54+dfsg/src/Seq.cc:16:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(chr_, s.c_str(), p-s.c_str());
data/stacks-2.54+dfsg/src/Seq.cc:58:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        id = new char[strlen(other.id)+1];
data/stacks-2.54+dfsg/src/Seq.cc:65:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            (other.seq  != NULL ? strlen(other.seq)  : -1),
data/stacks-2.54+dfsg/src/Seq.cc:66:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            (other.qual != NULL ? strlen(other.qual) : -1)
data/stacks-2.54+dfsg/src/Seq.cc:71:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        assert(long(strlen(other.seq)) <= capacity);
data/stacks-2.54+dfsg/src/Seq.cc:78:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        assert(long(strlen(other.qual)) <= capacity);
data/stacks-2.54+dfsg/src/Seq.cc:84:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        loc_str = new char[strlen(other.loc_str)+1];
data/stacks-2.54+dfsg/src/Seq.cc:98:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    this->id = new char[strlen(id) + 1];
data/stacks-2.54+dfsg/src/Seq.cc:101:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    capacity = strlen(seq);
data/stacks-2.54+dfsg/src/Seq.cc:112:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(this->qual, qual, capacity); // (trucates)
data/stacks-2.54+dfsg/src/Seq.cc:128:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            std::reverse(this->qual, this->qual + strlen(this->qual));
data/stacks-2.54+dfsg/src/Seq.cc:132:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    this->loc_str = new char[strlen(chr)  + 15];
data/stacks-2.54+dfsg/src/Seq.h:45:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            chr_ = new char[strlen(other.chr())+1];
data/stacks-2.54+dfsg/src/Seq.h:51:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        this->chr_   = new char[strlen(chr)  + 1];
data/stacks-2.54+dfsg/src/Seq.h:57:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        this->chr_   = new char[strlen(chr)  + 1];
data/stacks-2.54+dfsg/src/Seq.h:72:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        chr_   = new char[strlen(ochr)+1];
data/stacks-2.54+dfsg/src/Seq.h:79:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    bool empty() const {return chr_ == NULL || strlen(chr_) == 0;}
data/stacks-2.54+dfsg/src/SuffixTree.cc:56:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t q_len    = strlen(query);
data/stacks-2.54+dfsg/src/Vcf.cc:325:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if(!equal) {
data/stacks-2.54+dfsg/src/Vcf.cc:329:49:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        header_.add_meta(VcfMeta(string(line+2, equal), string(equal+1)));
data/stacks-2.54+dfsg/src/Vcf.h:371:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(buffer_.size() > pos_ + strlen(buffer_.data() + pos_) + 1); // id.
data/stacks-2.54+dfsg/src/Vcf.h:382:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(buffer_.size() > pos_ + strlen(buffer_.data() + pos_) + 1); // id.
data/stacks-2.54+dfsg/src/Vcf.h:413:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(buffer_.size() > qual_ + strlen(buffer_.data() + qual_) + 1); // filters.
data/stacks-2.54+dfsg/src/Vcf.h:489:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(*a) > 1)
data/stacks-2.54+dfsg/src/Vcf.h:498:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(*a) > 1)
data/stacks-2.54+dfsg/src/clean.cc:124:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *stop = s->id + strlen(s->id);
data/stacks-2.54+dfsg/src/clean.cc:232:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(r->index_bc, p, lim);
data/stacks-2.54+dfsg/src/clean.cc:237:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(r->index_bc, p, lim);
data/stacks-2.54+dfsg/src/clean.cc:251:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(r->index_bc, p,  max_bc_size_2);
data/stacks-2.54+dfsg/src/clean.cc:311:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(r->machine, s->id, id_len);
data/stacks-2.54+dfsg/src/clean.cc:315:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(s->seq);
data/stacks-2.54+dfsg/src/clean.cc:323:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r->seq,   s->seq,  r->size - 1);
data/stacks-2.54+dfsg/src/clean.cc:324:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r->phred, s->qual, r->size - 1);
data/stacks-2.54+dfsg/src/clean.cc:334:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(r->inline_bc, r->seq, max_bc_size_1);
data/stacks-2.54+dfsg/src/clean.cc:338:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(r->inline_bc, r->seq, max_bc_size_2);
data/stacks-2.54+dfsg/src/clean.cc:349:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(r->inline_bc, r->seq, max_bc_size_2);
data/stacks-2.54+dfsg/src/clean.cc:370:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len   = strlen(q);
data/stacks-2.54+dfsg/src/clean.cc:413:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len   = strlen(q);
data/stacks-2.54+dfsg/src/clean.cc:551:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(bc, type == single_end ? href->se_bc : href->pe_bc, it->length());
data/stacks-2.54+dfsg/src/clean.cc:595:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    adp_len = strlen(adapter);
data/stacks-2.54+dfsg/src/clean.h:158:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int    read;
data/stacks-2.54+dfsg/src/clean.h:170:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    RawRead(uint buf_len, int read, int barcode_size, double win_size) {
data/stacks-2.54+dfsg/src/clean.h:178:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        this->read          = read;
data/stacks-2.54+dfsg/src/clean.h:381:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                href_1->inline_bc_len = strlen(bc_1);
data/stacks-2.54+dfsg/src/clean.h:384:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                href_2->inline_bc_len = strlen(bc_2);
data/stacks-2.54+dfsg/src/clean.h:393:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            href_1->inline_bc_len = strlen(bc_1);
data/stacks-2.54+dfsg/src/clean.h:403:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            href_2->inline_bc_len = strlen(bc_2);
data/stacks-2.54+dfsg/src/clone_filter.cc:253:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint  seq_len = strlen(s_1->seq);
data/stacks-2.54+dfsg/src/clone_filter.cc:685:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r_1 = new RawRead(strlen(s_1->seq), 1, min_bc_size_1, win_size);
data/stacks-2.54+dfsg/src/clone_filter.cc:686:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r_2 = new RawRead(strlen(s_2->seq), 2, min_bc_size_2, win_size);
data/stacks-2.54+dfsg/src/clone_filter.cc:973:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r_1 = new RawRead(strlen(s_1->seq), 1, min_bc_size_1, win_size);
data/stacks-2.54+dfsg/src/cstacks.cc:212:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const char *c_end    = c + strlen(c);
data/stacks-2.54+dfsg/src/cstacks.cc:215:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const char *q_end    = q + strlen(q);
data/stacks-2.54+dfsg/src/cstacks.cc:427:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            assert(strlen(ctag->con) == strlen(qtag_merge->con));
data/stacks-2.54+dfsg/src/cstacks.cc:427:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            assert(strlen(ctag->con) == strlen(qtag_merge->con));
data/stacks-2.54+dfsg/src/cstacks.cc:789:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int con_len   = strlen(sample[keys[0]]->con);
data/stacks-2.54+dfsg/src/cstacks.cc:1565:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int num_kmers = strlen(catalog.begin()->second->con) - kmer_len + 1;
data/stacks-2.54+dfsg/src/export_formats.cc:79:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    for (const char *s1 = a1.first + strlen(a1.first), *s2 = a2.first + strlen(a2.first);
data/stacks-2.54+dfsg/src/export_formats.cc:79:89:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    for (const char *s1 = a1.first + strlen(a1.first), *s2 = a2.first + strlen(a2.first);
data/stacks-2.54+dfsg/src/export_formats.cc:131:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/export_formats.cc:2438:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/export_formats.cc:3229:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/export_formats.cc:3413:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/export_formats.cc:3785:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/file_io.cc:672:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(line) == 0) continue;
data/stacks-2.54+dfsg/src/file_io.cc:793:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (p != NULL && strlen(p) > 0) se_bc.insert(string(p));
data/stacks-2.54+dfsg/src/file_io.cc:794:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (r != NULL && strlen(r) > 0) pe_bc.insert(string(r));
data/stacks-2.54+dfsg/src/gstacks.cc:268:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            #pragma omp critical(read)
data/stacks-2.54+dfsg/src/gstacks.cc:1092:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        for (const SAlnRead& read : aln_loc.reads()) {
data/stacks-2.54+dfsg/src/gstacks.cc:1094:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            assert(read.name.length() >= 2 && *++read.name.rbegin() == '/');
data/stacks-2.54+dfsg/src/gstacks.cc:1094:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            assert(read.name.length() >= 2 && *++read.name.rbegin() == '/');
data/stacks-2.54+dfsg/src/gstacks.cc:1095:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            Cigar c = read.cigar;
data/stacks-2.54+dfsg/src/gstacks.cc:1111:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read.name.substr(0, read.name.length() - 2),
data/stacks-2.54+dfsg/src/gstacks.cc:1111:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read.name.substr(0, read.name.length() - 2),
data/stacks-2.54+dfsg/src/gstacks.cc:1112:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                *read.name.rbegin() == '1' ? BAM_FREAD1 : BAM_FREAD2,
data/stacks-2.54+dfsg/src/gstacks.cc:1116:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read.seq,
data/stacks-2.54+dfsg/src/gstacks.cc:1117:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read.sample
data/stacks-2.54+dfsg/src/gstacks.cc:1119:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            loc_.o_bam.at(merged_input ? 0 : read.sample).push_back(move(rec));
data/stacks-2.54+dfsg/src/gstacks.cc:1194:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        for (const SAlnRead& read : aln_loc.reads())
data/stacks-2.54+dfsg/src/gstacks.cc:1195:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            loc_.details_ss << read.name << '\t' << loc_.mpopi->samples()[read.sample].name
data/stacks-2.54+dfsg/src/gstacks.cc:1195:75:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            loc_.details_ss << read.name << '\t' << loc_.mpopi->samples()[read.sample].name
data/stacks-2.54+dfsg/src/gstacks.cc:1196:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                            << '\t' << read.cigar << '\n';
data/stacks-2.54+dfsg/src/gstacks.h:269:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            SRead&& read,
data/stacks-2.54+dfsg/src/gzFasta.cc:94:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFasta.cc:121:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFasta.cc:131:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:81:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:89:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    s->id = new char[strlen(this->line) + 1];
data/stacks-2.54+dfsg/src/gzFastq.h:101:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:124:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (res == NULL && strlen(this->line) == 0) {
data/stacks-2.54+dfsg/src/gzFastq.h:128:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:165:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:184:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/gzFastq.h:206:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (res == NULL && strlen(this->line) == 0) {
data/stacks-2.54+dfsg/src/gzFastq.h:210:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(this->line);
data/stacks-2.54+dfsg/src/input.cc:113:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        blen = strlen(buf);
data/stacks-2.54+dfsg/src/input.cc:146:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        blen = strlen(buf);
data/stacks-2.54+dfsg/src/kmer_filter.cc:347:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers      = strlen(s_1->seq) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmer_filter.cc:369:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers    = strlen(s_2->seq) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmer_filter.cc:513:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers    = strlen(s->seq) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmer_filter.cc:736:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers = strlen(s_1->seq) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmer_filter.cc:743:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers = strlen(s_2->seq) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmer_filter.cc:906:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers = strlen(s->seq) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmer_filter.cc:994:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1033:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            hash_key = new char [strlen(kmer) + 1];
data/stacks-2.54+dfsg/src/kmer_filter.cc:1045:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    kmer_len = strlen(kmer_map.begin()->first);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1113:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers = strlen(s->seq) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmer_filter.cc:1121:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(kmer, s->seq + j, kmer_len);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1221:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                      char *read, char *kmer,
data/stacks-2.54+dfsg/src/kmer_filter.cc:1237:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(kmer, read + j, kmer_len);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1265:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(kmer, read + j, kmer_len);
data/stacks-2.54+dfsg/src/kmer_filter.cc:1285:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            char *read, char *kmer,
data/stacks-2.54+dfsg/src/kmer_filter.cc:1304:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(kmer, read + j, kmer_len);
data/stacks-2.54+dfsg/src/kmers.cc:109:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(kmer, k, kmer_len);
data/stacks-2.54+dfsg/src/kmers.cc:125:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(kmer, k, kmer_len);
data/stacks-2.54+dfsg/src/kmers.cc:204:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int num_kmers = strlen(merged.begin()->second->con) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmers.cc:251:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers = strlen(tag->con) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmers.cc:305:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers = strlen(tag->con) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmers.cc:365:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        num_kmers = strlen(tag->con) - kmer_len + 1;
data/stacks-2.54+dfsg/src/kmers.cc:437:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const char *p_end = p + strlen(p);
data/stacks-2.54+dfsg/src/kmers.cc:449:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const char *q_end = q + strlen(q);
data/stacks-2.54+dfsg/src/kmers.cc:470:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len_1 = strlen(tag_1);
data/stacks-2.54+dfsg/src/kmers.cc:471:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len_2 = strlen(tag_2);
data/stacks-2.54+dfsg/src/kmers.cc:577:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint  q_len = strlen(q);
data/stacks-2.54+dfsg/src/kmers.cc:663:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const char *p_end = p + strlen(p) - 1;
data/stacks-2.54+dfsg/src/kmers.cc:664:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const char *q_end = q + strlen(q) - 1;
data/stacks-2.54+dfsg/src/kmers.cc:687:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint  q_len   = strlen(q);
data/stacks-2.54+dfsg/src/kmers.h:44:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        unsigned int __len = strlen(__s);
data/stacks-2.54+dfsg/src/locus.cc:51:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char *c = new char [strlen(templ.comp[i]) + 1];
data/stacks-2.54+dfsg/src/locus.cc:56:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char *c = new char [strlen(templ.reads[i]) + 1];
data/stacks-2.54+dfsg/src/locus.cc:89:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    this->len = strlen(seq);
data/stacks-2.54+dfsg/src/locus.cc:103:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(this->model, seq, this->len);
data/stacks-2.54+dfsg/src/locus.cc:117:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (this->len > strlen(this->con))
data/stacks-2.54+dfsg/src/locus.cc:118:83:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        cerr << "Recorded locus->len: " << this->len << "; consensus length: " << strlen(this->con) << "\n";
data/stacks-2.54+dfsg/src/locus.h:332:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (auto& read: its_)
data/stacks-2.54+dfsg/src/locus.h:333:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        counts.increment(*read);
data/stacks-2.54+dfsg/src/locus_readers.h:962:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (SAlnRead& read : fw_reads) {
data/stacks-2.54+dfsg/src/locus_readers.h:963:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        cigar_extend_right(read.cigar, max_ref_span - cigar_length_ref(read.cigar));
data/stacks-2.54+dfsg/src/locus_readers.h:963:72:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        cigar_extend_right(read.cigar, max_ref_span - cigar_length_ref(read.cigar));
data/stacks-2.54+dfsg/src/locus_readers.h:964:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        aln_loc.add(move(read));
data/stacks-2.54+dfsg/src/locus_readers.h:966:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (SAlnRead& read : pe_reads) {
data/stacks-2.54+dfsg/src/locus_readers.h:967:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        cigar_extend_right(read.cigar, max_ref_span - cigar_length_ref(read.cigar));
data/stacks-2.54+dfsg/src/locus_readers.h:967:72:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        cigar_extend_right(read.cigar, max_ref_span - cigar_length_ref(read.cigar));
data/stacks-2.54+dfsg/src/locus_readers.h:968:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        aln_loc.add(move(read));
data/stacks-2.54+dfsg/src/mstack.cc:59:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    this->len = strlen(seq);
data/stacks-2.54+dfsg/src/mstack.cc:61:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(this->con, seq, len);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1253:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(bp, p, q - p);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1428:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(line);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1478:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1491:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(cat_loc_str, p, q - p);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1587:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(line);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1645:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1721:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(line);
data/stacks-2.54+dfsg/src/phasedstacks.cc:1745:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(pop_id_str, parts[1].c_str(), id_len);
data/stacks-2.54+dfsg/src/populations.cc:973:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        assert(!d[s]->obshap.empty() && strlen(d[s]->obshap[0]) == cloc->snps.size());
data/stacks-2.54+dfsg/src/populations.cc:1132:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    loc.s = new LocPopSum(strlen(loc.cloc->con), mpopi);
data/stacks-2.54+dfsg/src/populations.cc:1168:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    loc.s = new LocPopSum(strlen(loc.cloc->con), mpopi);
data/stacks-2.54+dfsg/src/populations.cc:1225:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        assert(strlen(d->obshap[0]) == cloc->snps.size()
data/stacks-2.54+dfsg/src/populations.cc:1226:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            && strlen(d->obshap[1]) == cloc->snps.size());
data/stacks-2.54+dfsg/src/populations.cc:3323:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(line);
data/stacks-2.54+dfsg/src/populations.cc:3377:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(line);
data/stacks-2.54+dfsg/src/populations.cc:3437:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(line);
data/stacks-2.54+dfsg/src/populations.cc:3503:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(line);
data/stacks-2.54+dfsg/src/process_radtags.cc:314:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r_1 = new RawRead(strlen(s_1->seq), 1, min_bc_size_1, win_size);
data/stacks-2.54+dfsg/src/process_radtags.cc:315:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r_2 = new RawRead(strlen(s_2->seq), 2, min_bc_size_2, win_size);
data/stacks-2.54+dfsg/src/process_radtags.cc:527:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r = new RawRead(strlen(s->seq), 1, min_bc_size_1, win_size);
data/stacks-2.54+dfsg/src/process_radtags.cc:809:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((*r_1)->inline_bc, (*r_1)->seq, max_bc_size_1);
data/stacks-2.54+dfsg/src/process_radtags.cc:815:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((*r_1)->inline_bc, (*r_1)->seq, max_bc_size_1);
data/stacks-2.54+dfsg/src/process_radtags.cc:820:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((*r_2)->inline_bc, (*r_2)->seq, max_bc_size_2);
data/stacks-2.54+dfsg/src/process_radtags.cc:826:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((*r_1)->inline_bc, (*r_1)->seq, max_bc_size_1);
data/stacks-2.54+dfsg/src/process_radtags.cc:836:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((*r_2)->inline_bc, (*r_2)->seq, max_bc_size_2);
data/stacks-2.54+dfsg/src/process_radtags.cc:864:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(href->seq + href->inline_bc_len, renz[res_enz][i], renz_len[res_enz]);
data/stacks-2.54+dfsg/src/process_radtags.cc:1248:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            adapter_1 = new char[strlen(optarg) + 1];
data/stacks-2.54+dfsg/src/process_radtags.cc:1253:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            adapter_2 = new char[strlen(optarg) + 1];
data/stacks-2.54+dfsg/src/process_shortreads.cc:298:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r_1 = new RawRead(strlen(s_1->seq), 1, min_bc_size_1, win_size);
data/stacks-2.54+dfsg/src/process_shortreads.cc:299:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r_2 = new RawRead(strlen(s_2->seq), 2, min_bc_size_2, win_size);
data/stacks-2.54+dfsg/src/process_shortreads.cc:486:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    r = new RawRead(strlen(s->seq), 1, min_bc_size_1, win_size);
data/stacks-2.54+dfsg/src/process_shortreads.cc:1005:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            adapter_1 = new char[strlen(optarg) + 1];
data/stacks-2.54+dfsg/src/process_shortreads.cc:1010:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            adapter_2 = new char[strlen(optarg) + 1];
data/stacks-2.54+dfsg/src/sql_utilities.cc:43:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!fh_status && strlen(line) == 0)
data/stacks-2.54+dfsg/src/sql_utilities.cc:175:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!fh_status && strlen(line) == 0)
data/stacks-2.54+dfsg/src/sql_utilities.cc:250:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!fh_status && strlen(line) == 0)
data/stacks-2.54+dfsg/src/sql_utilities.h:117:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!fh_status && strlen(line) == 0)
data/stacks-2.54+dfsg/src/sql_utilities.h:157:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                            strcpy(read, parts[5].c_str());
data/stacks-2.54+dfsg/src/sql_utilities.h:158:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                            loci[id]->reads.push_back(read);
data/stacks-2.54+dfsg/src/sql_utilities.h:214:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(cmp, p, len);
data/stacks-2.54+dfsg/src/sql_utilities.h:261:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!fh_status && strlen(line) == 0)
data/stacks-2.54+dfsg/src/sql_utilities.h:353:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!fh_status && strlen(line) == 0)
data/stacks-2.54+dfsg/src/sstacks.cc:780:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int con_len   = strlen(sample[keys[0]]->con);
data/stacks-2.54+dfsg/src/sstacks.cc:1130:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t qlen       = strlen(qseq);
data/stacks-2.54+dfsg/src/sstacks.cc:1177:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(key, all_it->second.c_str(), all_it->second.length());
data/stacks-2.54+dfsg/src/stacks.cc:69:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    this->seq = new DNANSeq(strlen(seq), seq);
data/stacks-2.54+dfsg/src/stacks.cc:75:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *f = new char[strlen(id) + 1];
data/stacks-2.54+dfsg/src/stacks.cc:86:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    this->seq = new DNANSeq(strlen(seq), seq);
data/stacks-2.54+dfsg/src/stacks.cc:136:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    this->seq = new DNANSeq(strlen(seq), seq);
data/stacks-2.54+dfsg/src/stacks.h:144:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char* copy = new char[strlen(read_name)+1];
data/stacks-2.54+dfsg/src/stacks.h:238:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        this->model     = new char[strlen(model) + 1];
data/stacks-2.54+dfsg/src/stacks.h:298:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char* copy = new char[strlen(readname)+1];
data/stacks-2.54+dfsg/src/tsv2bam.cc:385:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        size_t seq_len = strlen(seq);
data/stacks-2.54+dfsg/src/tsv2bam.cc:427:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        size_t seq_len = strlen(seq);
data/stacks-2.54+dfsg/src/tsv2bam.cc:473:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(l->con, new_con.c_str(), cloc_len+1);
data/stacks-2.54+dfsg/src/tsv2bam.cc:474:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(l->model, new_model.c_str(), cloc_len+1);
data/stacks-2.54+dfsg/src/tsv2bam.cc:484:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(r, new_r.c_str(), cloc_len+1);
data/stacks-2.54+dfsg/src/ustacks.cc:440:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(seq);
data/stacks-2.54+dfsg/src/ustacks.cc:467:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, seq + k, buf_size - 1);
data/stacks-2.54+dfsg/src/ustacks.cc:469:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            buf_len         = strlen(buf);
data/stacks-2.54+dfsg/src/ustacks.cc:2738:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        id = new char[strlen(c.id) + 1];
data/stacks-2.54+dfsg/src/utils.cc:106:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len   = strlen(seq);
data/stacks-2.54+dfsg/src/utils.cc:177:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(seq);
data/stacks-2.54+dfsg/src/utils.cc:454:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (path.compare(path.length()-strlen("catalog.calls"), string::npos, "catalog.calls") == 0)
data/stacks-2.54+dfsg/src/utils.cc:494:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        gzline_len_ = strlen(gzbuffer_);
data/stacks-2.54+dfsg/src/utils.cc:517:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                gzline_len_ += strlen(start);
data/stacks-2.54+dfsg/src/utils.cc:547:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (path.compare(path.length()-strlen("catalog.calls"), string::npos, "catalog.calls") == 0)
data/stacks-2.54+dfsg/src/write.cc:46:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<
data/stacks-2.54+dfsg/src/write.cc:51:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<
data/stacks-2.54+dfsg/src/write.cc:75:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<
data/stacks-2.54+dfsg/src/write.cc:80:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<
data/stacks-2.54+dfsg/src/write.cc:132:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<
data/stacks-2.54+dfsg/src/write.cc:139:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<
data/stacks-2.54+dfsg/src/write.cc:168:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<
data/stacks-2.54+dfsg/src/write.cc:175:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            "/" << href->read << "\n" <<

ANALYSIS SUMMARY:

Hits = 661
Lines analyzed = 56126 in approximately 1.40 seconds (40175 lines/second)
Physical Source Lines of Code (SLOC) = 38533
Hits@level = [0]  11 [1] 243 [2] 314 [3]  21 [4]  83 [5]   0
Hits@level+ = [0+] 672 [1+] 661 [2+] 418 [3+] 104 [4+]  83 [5+]   0
Hits/KSLOC@level+ = [0+] 17.4396 [1+] 17.1541 [2+] 10.8478 [3+] 2.69899 [4+] 2.154 [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.