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/mecat2-0.0+git20200428.f54c542+ds/src/algo/chain_dp.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/chain_dp.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/diff_gapalign.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/diff_gapalign.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hash_list_bucket_sort.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hash_list_bucket_sort.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hbn_lookup_table.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hbn_lookup_table.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hbn_traceback_aux.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hbn_traceback_aux.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/kalloc.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/kalloc.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/ksw2.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/ksw2_extd2_sse.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/ksw2_extz2_sse.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/ksw2_wrapper.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/ksw2_wrapper.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/lookup_table.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/lookup_table.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/argument_parser.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/argument_parser.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_bridge.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_bridge.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_link.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_link.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_link_store.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/contig_link_store.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fasta_reader.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fasta_reader.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fastq_reader.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fastq_reader.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fsa_assemble.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fsa_ctg_bridge.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fsa_ol_compare.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fsa_ol_filter.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fsa_ol_show.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fsa_ol_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/fsa_rd_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/logger.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/logger.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_compare.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_compare.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_filter.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_filter.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_improve.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_improve.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_show.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_show.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_stat.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/path_graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/path_graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/read_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/read_stat.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/read_store.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/read_store.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/sequence.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/sequence.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/simple_align.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/simple_align.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/utility.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/utility.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/hbndb/concatdb.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/hbndb/makehbndb.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/hbndb/viewhbndb.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/cmdline_args.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/cmdline_args.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_align_one_volume.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_align_one_volume.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_build_seqdb.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_build_seqdb.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_extend_subseq_hit.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_extend_subseq_hit.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_find_subseq_hit.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_find_subseq_hit.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_options.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_options.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_subseq_hit.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_subseq_hit.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_task_struct.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_task_struct.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/mecat_results.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/mecat_results.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cmdline_args.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cmdline_args.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_aux.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_aux.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_part.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_part.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_read.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_read.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_options.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_options.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/fccns.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/fccns.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/fccns_align_tag.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/fccns_align_tag.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/fccns_aux.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/fccns_aux.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/hbn_task_struct.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/hbn_task_struct.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/raw_reads_reader.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/raw_reads_reader.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2ctgstats/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pcan/pcan.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/ketopt.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/cmdline_args.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/cmdline_args.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/largest_cover_range.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/largest_cover_range.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/lcr_options.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/cmdline_args.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/cmdline_args.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/split_reads.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/split_reads.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/sr_options.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/3_trim_bases/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/m4_aux.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/m4_aux.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/range_list.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/range_list.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/test/find_name.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/app/test/main.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/blast_query_info.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/blast_query_info.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/blast_sequence_blk.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/blast_sequence_blk.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cmd_arg.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cmd_arg.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cstr_util.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cstr_util.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/db_format.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/db_format.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/fasta.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/fasta.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/gapped_candidate.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/gapped_candidate.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_defs.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_format.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_format.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_hit.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_hit.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_package_version.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_package_version.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/khash.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/ksort.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kvec.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/line_reader.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/line_reader.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/m4_record.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/m4_record.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/name2id_map.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/name2id_map.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/ncbi_blast_aux.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/ncbi_blast_aux.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/raw_reads.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/raw_reads.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/sam_writter.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/sam_writter.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seq_tag.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seq_tag.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seq_tag_report.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seq_tag_report.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb_summary.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb_summary.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/sequence.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/sequence.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/small_object_alloc.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/small_object_alloc.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/string2hsp.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/string2hsp.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/argument_parser.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/argument_parser.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_bridge.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_bridge.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_link.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_link.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_link_store.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/contig_link_store.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fasta_reader.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fasta_reader.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fastq_reader.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fastq_reader.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fsa_assemble.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fsa_ctg_bridge.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fsa_ol_compare.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fsa_ol_filter.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fsa_ol_show.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fsa_ol_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/fsa_rd_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/logger.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/logger.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_compare.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_compare.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_filter.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_filter.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_improve.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_improve.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_show.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_show.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_stat.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/path_graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/path_graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/read_stat.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/read_stat.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/read_store.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/read_store.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/sequence.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/sequence.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/simple_align.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/simple_align.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/utility.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/utility.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/c_ncbi_blast_aux.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/c_ncbi_blast_aux.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/blast_args.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/blast_args.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/cmdline_flags.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/cmdline_flags.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/format_flags.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/format_flags.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/ncbiargs_allow.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/ncbiargs_allow.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/ncbiargs_desc.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/ncbiargs_desc.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/ncbiargs_types.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/ncbiargs_types.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/ncbi_blast_aux.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/ncbi_blast_aux.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_encoding.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_encoding.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_hits.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_hits.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_message.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_message.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_options.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_options.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_parameters.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_parameters.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_program.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_program.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_query_info.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_query_info.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_rps.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_sequence_blk.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_sequence_blk.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_types.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_types.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_types.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/boost_erf.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/boost_erf.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/gapinfo.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/gapinfo.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/hsp2string.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/hsp2string.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/lookup_wrap.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/na_strand.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/ncbi_erf.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/ncbi_math.c
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/ncbi_math.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/pattern.h
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/ncbistr.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/ncbistr.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/ncbistr_util.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/ncbistr_util.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_cmp.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_cmp.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_util.cpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_util.hpp
Examining data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/tempstr.hpp

FINAL RESULTS:

data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hash_list_bucket_sort.c:172:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(job_name, "bucket sort pass %" PRIu64, p);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/logger.cpp:24:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf(file_, format, arglist);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/logger.cpp:95:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf(file_, format, arglist);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/hbndb/makehbndb.c:149:13:  [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(seqdb_dir, F_OK) != 0) {
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_align_one_volume.c:123:30:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                dump_cns_hit(sprintf, line, cns_hit);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_build_seqdb.c:14:10:  [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(opts->db_dir, F_OK) != 0)
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:15:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "%s/%s/stage%s_Q%s_D%s", wrk_dir, stage, stage, qi_buf, sj_buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:17:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "%s/stage%s_Q%s_D%s", stage, stage, qi_buf, sj_buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:38:13:  [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.
    return (access(path, F_OK) == 0);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_task_struct.c:50:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(cmd, "rm -r %s", ht_struct->opts->db_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:48:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%s", opts->db_dir, kBackupAlignResultsDir);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:49:10:  [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(path, F_OK) != 0)
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:91:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(job_name, "Q%s_vs_S%s", qibuf, sjbuf);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_part.c:38:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(job_name, "correcting subject %s --- %s", buf1, buf2);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c:14:12:  [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.
    return access(path, F_OK) == 0;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c:38:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(job_name, "correcting part %s", pid_str);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c:39:5:  [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(path, buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c:104:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "rm -r %s", seqdb_path);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pcan/pcan.c:178:10:  [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(path, F_OK) != 0)
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pcan/pcan.c:189:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/pcan.done", pcan_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pcan/pcan.c:190:12:  [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.
    return access(path, F_OK) == 0;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pcan/pcan.c:197:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/pcan.done", pcan_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/main.c:191:10:  [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(path, F_OK) != 0)
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/main.c:202:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/pcan.done", pm4_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/main.c:203:12:  [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.
    return access(path, F_OK) == 0;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/main.c:210:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/pcan.done", pm4_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/main.c:21:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(job_name, "Find largest cover ranges for part %s", part_buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/main.c:19:19:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        HBN_SCANF(sscanf, ks_s(*line), 4, "%d%d%d%d", &id, &cr_array[i].left, &cr_array[i].right, &cr_array[i].size);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/main.c:41:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(job_name, "Find clear ranges for part %s", part_buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/3_trim_bases/main.c:27:19:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        HBN_SCANF(sscanf, ks_s(*line), 4, "%d%d%d%d", &id, &cr_array[i].left, &cr_array[i].right, &cr_array[i].size);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:161:21:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    dump_seqdb_info(fprintf, ascii_out, dbinfo);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:184:29:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            dump_seqdb_info(fprintf, ascii_out, dbinfo);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:203:25:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        dump_seqdb_info(fprintf, ascii_out, dbinfo);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:223:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (seqdb_dir) sprintf(path, "%s/", seqdb_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:224:22:  [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).
    if (seqdb_title) strcat(path, seqdb_title);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:227:9:  [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(path, F_OK) != 0) return 0;
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:287:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (seqdb_dir) sprintf(path, "%s/", seqdb_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:288:22:  [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).
    if (seqdb_title) strcat(path, seqdb_title);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/fasta.c:305:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(msg, "HbnFastaReader: "
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/fasta.c:309:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(msg, "HbnFastaReader: "
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:51:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf, sizeof(buf), fmt, args);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:157:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.h:128:33:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define hbn_system(cmd) do { if(system(cmd) != 0) HBN_ERR("fail to running '%s'", cmd); } while(0)
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_hit.h:60:44:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define dump_hbn_hsp_std(hsp) dump_hbn_hsp(fprintf, stderr, hsp)
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_package_version.c:5:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(build_info, "%s %s", __DATE__, __TIME__);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:14:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	l = vsnprintf(s->s + s->l, s->m - s->l, fmt, args); // This line does not work with glibc 2.0. See `man snprintf'.
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:21:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		l = vsnprintf(s->s + s->l, s->m - s->l, fmt, args);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:9:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:10:17:  [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).
    if (prefix) strcat(path, prefix);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:13:5:  [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(path, buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:21:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:23:9:  [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(path, prefix);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:37:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "%s/%s.np", data_dir, prefix);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:39:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "%s/np", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:43:15:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    HBN_SCANF(fscanf, in, 1, "%d", &np);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:7:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:9:9:  [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(path, db_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:39:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:41:9:  [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(path, db_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:69:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:71:9:  [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(path, db_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:81:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:83:9:  [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(path, db_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:142:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:144:9:  [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(path, db_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:154:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:156:9:  [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(path, db_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:185:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if (data_dir) sprintf(path, "%s/", data_dir);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:187:9:  [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(path, db_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb_summary.c:224:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, "(%s, %s):", LenStatPoints[i].Nx, LenStatPoints[i].Lx);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/sequence.c:82:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(msg, "FastaReader: Start of first data line in sequence with header '%s' is about %lu%% ambiguous nucleotides"
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/logger.cpp:24:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf(file_, format, arglist);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/logger.cpp:95:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf(file_, format, arglist);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1460: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(temp, cp);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3586:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
         sprintf(buffer, "%s is not a supported matrix", matrix_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3592:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buffer, "%s is a supported matrix", matrix_info->name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3601:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
         sprintf(buffer, "Gap existence and extension values of %ld and %ld not supported for %s", (long) gap_open, (long) gap_extend, matrix_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3708:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
         sprintf(buffer, "%s is not a supported matrix", matrix_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3713:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buffer, "%s is a supported matrix", matrix_info->name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3720:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
         sprintf(buffer, "Gap existence and extension values of %ld and %ld not supported for %s", (long) gap_open, (long) gap_extend, matrix_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3810:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(ptr, "%s is not a supported matrix, supported matrices are:\n", matrix_name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3819:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
         sprintf(ptr, "%s \n", matrix_info->name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3841:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
   sprintf(ptr, "Gap existence and extension values of %ld and %ld not supported for %s\nsupported values are:\n",
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1868:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        ::sprintf(buffer, format, value);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1927:15:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        n = ::sprintf(buffer, format, (int)precision, value);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/argument_parser.cpp:79:19:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1)
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c:26:5:  [3] (buffer) getopt:
  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 getopt(int argc, const char * const argv[], const char *optstring)
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c:176:9:  [3] (buffer) getopt:
  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.
	return getopt(argc, argv, optstring);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c:208:5:  [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 getopt_long(int argc, const char *const *argv, const char *optstring, const struct option *longopts, int *idx)
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.h:31:5:  [3] (buffer) getopt:
  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 getopt(int, const char * const [], const char *);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.h:42:5:  [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 getopt_long(int, const char *const *, const char *, const struct option *, int *);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c:27:5:  [3] (random) srand:
  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.
    srand((long)time(0));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/ksort.h:265:14:  [3] (random) drand48:
  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.
			j = (int)(drand48() * i);									\
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/ksort.h:273:23:  [3] (random) drand48:
  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.
			double z = 1., x = drand48(); \
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/argument_parser.cpp:79:19:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1)
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c:26:5:  [3] (buffer) getopt:
  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 getopt(int argc, const char * const argv[], const char *optstring)
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c:176:9:  [3] (buffer) getopt:
  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.
	return getopt(argc, argv, optstring);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c:208:5:  [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 getopt_long(int argc, const char *const *argv, const char *optstring, const struct option *longopts, int *idx)
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.h:31:5:  [3] (buffer) getopt:
  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 getopt(int, const char * const [], const char *);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.h:42:5:  [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 getopt_long(int, const char *const *, const char *, const struct option *, int *);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:932:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    use_old_fsc = getenv("OLD_FSC");
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/chain_dp.c:67:14:  [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 LogTable256[256] = {
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hash_list_bucket_sort.c:73:3:  [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(tmp_buckets[i], buckets[i], sizeof(u64) * BS_BucketSize);
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hash_list_bucket_sort.c:167:2:  [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 job_name[1024];
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/hbn_lookup_table.c:199: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 buf1[64], buf2[64], buf3[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/kalloc.c:142:2:  [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(q, ap, (*p - 1) * sizeof(size_t));
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/ksw2_extd2_sse.c:121:2:  [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(sf, target, tlen);
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/ksw2_extz2_sse.c:99:2:  [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(sf, target, tlen);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/argument_parser.cpp:174:15:  [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).
    *v = std::atoi(str.c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:147:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fcontig_seqs = fopen(OutputPath("contigs.fasta").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:148:27:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fcontig_tiles = fopen(OutputPath("contig_tiles").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:150:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fbubble_seqs = fopen(OutputPath("bubbles.fasta").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:151:27:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fbubble_tiles = fopen(OutputPath("bubble_tiles").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/logger.cpp:10:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        file_ = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/logger.cpp:74:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        file_ = fopen(filename_.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/logger.cpp:89: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 tmp[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:25:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.id = atoi(items[0].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:26:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.id = atoi(items[1].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:29:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        score_ = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:31:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:32: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).
        a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:33:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:34:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:36:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:37: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).
        b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:38:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap.cpp:39:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:56: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).
        o.a_.id = atoi(items[0].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:57: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).
        o.b_.id = atoi(items[1].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:60: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).
        o.score_ = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:62: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).
        o.a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:63: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).
        o.a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:64: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).
        o.a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:65: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).
        o.a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:67: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).
        o.b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:68: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).
        o.b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:69: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).
        o.b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:70: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).
        o.b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:96: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).
        o.score_ = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:98: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).
        o.a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:99: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).
        o.a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:100: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).
        o.a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:101: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).
        o.a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:103: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).
        o.b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:104: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).
        o.b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:105: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).
        o.b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:106: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).
        o.b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:122: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).
        o.a_.id = atoi(items[0].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:123: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).
        o.b_.id = atoi(items[1].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:127: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).
        o.score_ = atoi(items[2].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:130: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).
        o.a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:131: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).
        o.a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:132: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).
        o.a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:133: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).
        o.a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:135: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).
        o.b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:136: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).
        o.b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:137: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).
        o.b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:138: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).
        o.b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:159: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).
        o.a_.len = atoi(items[1].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:160: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).
        o.a_.start = atoi(items[2].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:161: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).
        o.a_.end = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:169: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).
        o.b_.len = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:170: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).
        o.b_.start = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:171: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).
        o.b_.end = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:175:52:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o.identity_ = atof(items[9].c_str())*100 / atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/overlap_store.cpp:176:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o.score_ = -atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/path_graph.cpp:903:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/path_graph.cpp:926:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/path_graph.cpp:961:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/path_graph.cpp:987:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:77: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 buff[24];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:79: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(buff, "%09d:B", id-1);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:82: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(buff, "%09d:E", -id-1);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:85: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(buff, "NA");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:92: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 buff[24];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:93: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(buff, "%09d", id);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:761:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:793:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/hbndb/viewhbndb.c:46:33:  [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_seq_size = atoi(argv[3]);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/hbndb/viewhbndb.c:55: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).
        *min_seq_size = atoi(argv[2]);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_align_one_volume.c: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[1024];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_extend_subseq_hit.c:131:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(hsp, hsp_array + i, sizeof(BlastHSP));
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_extend_subseq_hit.c:177:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(hsp_list, hsplist_array + i, sizeof(BlastHSPList));
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_find_subseq_hit.c:44:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tmp_init_hit_array + init_hit_idx, c, sizeof(HbnInitHit) * n);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_find_subseq_hit.c:47: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(init_hit_array, tmp_init_hit_array, sizeof(HbnInitHit) * init_hit_idx);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:9: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 qi_buf[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:10: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 sj_buf[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:26: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:35: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:37:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, ".mapped");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:44: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_job_control.c:46:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, ".mapped");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_task_struct.c:49: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 cmd[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:16: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:20: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 buffer[kBufLen];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:47: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:67: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 job_name[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/main.c:88: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 qibuf[64], sjbuf[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_aux.c:102: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_part.c:30: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 job_name[1000];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_part.c:31: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 buf1[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_part.c:32: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 buf2[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/hbn_task_struct.c:60: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/hbn_task_struct.c:65:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, ".cns.fasta");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c:11: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c:13:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, ".corrected");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c:20: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c:22:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, ".corrected");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c: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 job_name[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/main.c:34: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 pid_str[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/raw_reads_reader.c:24: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c:24: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(path, "ext_seqs_db_");
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c:25: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[11];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c:52: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 seqdb_path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2extseqs/main.c:103: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 cmd[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pcan/pcan.c:188: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pcan/pcan.c:196: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/main.c:201: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2pm4/main.c:209: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/main.c:17: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 job_name[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/1_largest_cover_range/main.c:18: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 part_buf[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/main.c:37: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 job_name[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/2_split_reads/main.c:38: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 part_buf[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/3_trim_bases/main.c:80:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    const int use_new_numeric_header = atoi(argv[3]);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/m4_aux.c:6:2:  [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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/range_list.c:92:6:  [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; // is true, the start of a new interval
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/range_list.c:95:80:  [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).
#define intv_depth_lt(a, b) (((a).pos < (b).pos) || ((a).pos == (b).pos && (a).open > (b).open))
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/range_list.c:95:91:  [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).
#define intv_depth_lt(a, b) (((a).pos < (b).pos) || ((a).pos == (b).pos && (a).open > (b).open))
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2trim/common/range_list.c:119: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).
		if (id[i].open) {
data/mecat2-0.0+git20200428.f54c542+ds/src/app/test/main.c:196: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 size_buf[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:36: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[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:142: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 buf1[64], buf2[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:221: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:225:26:  [2] (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). Risk is low because the
  source is a constant string.
    if (path[0] != '\0') strcat(path, ".hbndb_is_built");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:226:10:  [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.
    else sprintf(path, "hbndb_is_built");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:229: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 new_info[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:231: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, input, strlen(input));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:233: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, &min_seq_size, sizeof(min_seq_size));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:235: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, &max_file_seqs, sizeof(max_file_seqs));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:237: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, &max_file_res, sizeof(max_file_res));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:239: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, &rename_seq, sizeof(rename_seq));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:243: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, &new_stat, sizeof(new_stat));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:249: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 old_info[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:266: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 new_info[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:268: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, input, strlen(input));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:270: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, &min_seq_size, sizeof(min_seq_size));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:272: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, &max_file_seqs, sizeof(max_file_seqs));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:274: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, &max_file_res, sizeof(max_file_res));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:276: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, &rename_seq, sizeof(rename_seq));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:280: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, &new_stat, sizeof(new_stat));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:285: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:289:26:  [2] (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). Risk is low because the
  source is a constant string.
    if (path[0] != '\0') strcat(path, ".hbndb_is_built");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:290:10:  [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.
    else sprintf(path, "hbndb_is_built");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:311: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cstr_util.cpp:18: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(cstr, str.c_str(), str.size());
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cstr_util.cpp:27: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(buf, str.c_str(), str.size());
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cstr_util.cpp:36: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(buf, str.c_str(), str.size());
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/cstr_util.cpp:45: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(buf, str.c_str(), str.size());
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/fasta.c:117: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, new_name, n);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/fasta.c:303: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 msg[512];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:48: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[HBN_MAX_PATH_LEN + 1];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:49: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 time_str[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:114:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((stream = fopen(path, mode)) == 0) {
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:221: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 rebuf[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:260:12:  [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 char n_str[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:283: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(p, "%zu", m);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:289:12:  [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 char n_str[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:297: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[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_package_version.c:12: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 build_info[512];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:133:2:  [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[kBufSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.h:174:2:  [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->s + s->l, p, l);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.h:227:2:  [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->s + s->l, p, l);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.h:234:2:  [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/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.h:256:2:  [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/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.h:277:2:  [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/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kvec.h:84:3:  [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((v1).a, (v0).a, sizeof(type) * (v0).n);		\
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kvec.h:127:2:  [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((vec).a + _org_nitem, ptr, sizeof(type) * (nitem)); \
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:11: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[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:19: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:26:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "np");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:35: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:74: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:142:28:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                if (i > m) memcpy(a + m * data->record_size, a + i * data->record_size, data->record_size);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:158:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(a + n * data->record_size, record, data->record_size);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:161:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(a + i * data->record_size, record, data->record_size);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/raw_reads.c:85:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(raw_reads->raw_reads->packed_seq + pbs, vol->packed_seq + offset, s);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/raw_reads.c:90:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(raw_reads->raw_reads->seq_header_list + hbs, hdr, s + 1);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:12:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "ambig");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:22: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:44:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "hdr");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:52: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:74:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "seq_info");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:86:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "summary");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:96: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:117: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:147:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "volume_info.txt");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:159:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "volume_info.bin");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:165: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:190:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(path, "pac");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:245: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 path[HBN_MAX_PATH_LEN];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb_summary.c:155:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                min_seq_size = atoi(argv[3]);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb_summary.c:159: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).
        min_seq_size = atoi(argv[argc-1]);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb_summary.c:223: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[64], buf1[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/sequence.c:104: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 msg[512];
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/sequence.c:105: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(msg, "FastaReader: There are invalid nucleotide residue(s) in input sequence around line %lu and column %lu", seq->reader->line_number, pos);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/string2hsp.cpp:187:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(hsp, &reader->hsp, sizeof(HbnHSP));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/string2hsp.cpp:203:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&reader->hsp, hsp, sizeof(HbnHSP));
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/argument_parser.cpp:174:15:  [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).
    *v = std::atoi(str.c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:147:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fcontig_seqs = fopen(OutputPath("contigs.fasta").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:148:27:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fcontig_tiles = fopen(OutputPath("contig_tiles").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:150:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fbubble_seqs = fopen(OutputPath("bubbles.fasta").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:151:27:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fbubble_tiles = fopen(OutputPath("bubble_tiles").c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/logger.cpp:10:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        file_ = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/logger.cpp:74:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        file_ = fopen(filename_.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/logger.cpp:89: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 tmp[64];
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:25:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.id = atoi(items[0].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:26:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.id = atoi(items[1].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:29:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        score_ = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:31:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:32: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).
        a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:33:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:34:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:36:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:37: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).
        b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:38:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap.cpp:39:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:56: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).
        o.a_.id = atoi(items[0].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:57: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).
        o.b_.id = atoi(items[1].c_str()) - 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:60: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).
        o.score_ = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:62: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).
        o.a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:63: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).
        o.a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:64: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).
        o.a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:65: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).
        o.a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:67: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).
        o.b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:68: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).
        o.b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:69: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).
        o.b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:70: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).
        o.b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:96: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).
        o.score_ = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:98: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).
        o.a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:99: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).
        o.a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:100: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).
        o.a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:101: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).
        o.a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:103: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).
        o.b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:104: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).
        o.b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:105: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).
        o.b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:106: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).
        o.b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:122: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).
        o.a_.id = atoi(items[0].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:123: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).
        o.b_.id = atoi(items[1].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:127: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).
        o.score_ = atoi(items[2].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:130: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).
        o.a_.strand = atoi(items[4].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:131: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).
        o.a_.start = atoi(items[5].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:132: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).
        o.a_.end = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:133: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).
        o.a_.len = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:135: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).
        o.b_.strand = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:136: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).
        o.b_.start = atoi(items[9].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:137: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).
        o.b_.end = atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:138: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).
        o.b_.len = atoi(items[11].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:159: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).
        o.a_.len = atoi(items[1].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:160: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).
        o.a_.start = atoi(items[2].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:161: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).
        o.a_.end = atoi(items[3].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:169: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).
        o.b_.len = atoi(items[6].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:170: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).
        o.b_.start = atoi(items[7].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:171: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).
        o.b_.end = atoi(items[8].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:175:52:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o.identity_ = atof(items[9].c_str())*100 / atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/overlap_store.cpp:176:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o.score_ = -atoi(items[10].c_str());
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/path_graph.cpp:903:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/path_graph.cpp:926:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/path_graph.cpp:961:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/path_graph.cpp:987:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:77: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 buff[24];
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:79: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(buff, "%09d:B", id-1);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:82: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(buff, "%09d:E", -id-1);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:85: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(buff, "NA");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:92: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 buff[24];
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:93: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(buff, "%09d", id);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:761:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:793:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(fname.c_str(), "w");
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/c_ncbi_blast_aux.c:28:2:  [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(copy, orig, size);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/cmdline_args/blast_args.cpp: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 build_info[512];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_encoding.c:77:7:  [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.
const char BLASTNA_TO_IUPACNA[BLASTNA_SIZE] = {
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_encoding.c:82:7:  [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.
const char NCBI4NA_TO_IUPACNA[BLASTNA_SIZE] = {
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_encoding.c:117:7:  [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.
const char NCBISTDAA_TO_AMINOACID[BLASTAA_SIZE] = {
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_hits.c:209: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((void*)retval, (void*) hit_params, sizeof(SBlastHitsParameters));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_hits.c:380:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&retval->query, &hsp->query, sizeof(BlastSeg));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_hits.c:381:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&retval->subject, &hsp->subject, sizeof(BlastSeg));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_hits.c:430:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(copy->left, old->left,
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_hits.c:441:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(copy->right, old->right,
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_message.c:231: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[512];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1172: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 fbuf[512+3];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1173: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 alphabet[24];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1363: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[512+3];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1364: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 temp[512];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1371: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    a1chars[BLASTAA_SIZE], a2chars[BLASTAA_SIZE];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1693:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                if ( (fp=fopen(full_matrix_path, "r")) == NULL) {
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3055:50:  [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).
Blast_GetMatrixValues(const char* matrix, Int4** open, Int4** extension, double** lambda, double** K, double** H, double** alpha, double** beta, Int4** pref_flags)
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3087: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).
      if (open)
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3109: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).
         if (open)
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3394: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 buffer[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3395: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(buffer, "Substitution scores %d and %d are not supported",
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3546:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
           char buffer[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3550: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(buffer, "Gap existence and extension values of %ld and %ld are supported", (long) BLAST_Nint(values[index][0]), (long) BLAST_Nint(values[index][1]));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3552: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(buffer, "Gap existence, extension and decline-to-align values of %ld, %ld and %ld are supported", (long) BLAST_Nint(values[index][0]), (long) BLAST_Nint(values[index][1]), (long) BLAST_Nint(values[index][2]));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3572:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3697:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[256];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3865: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(ptr, "%ld, %ld\n", (long) BLAST_Nint(values[index][0]), (long) BLAST_Nint(values[index][1]));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3867: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(ptr, "%ld, %ld, %ld\n", (long) BLAST_Nint(values[index][0]), (long) BLAST_Nint(values[index][1]), (long) BLAST_Nint(values[index][2]));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3943:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buffer[8192];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3947: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(buffer, "Gap existence and extension values %ld and %ld "
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3953: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.
                     sprintf(buffer+len, "%ld and %ld are supported existence and extension values\n",
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3957: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(buffer+len, "%ld and %ld are supported existence and extension values\n",
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3960: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(buffer+len, "Any values more stringent than %ld and %ld are supported\n",
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/gapinfo.c:100:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(new->op_type, old->op_type, (old->size)*sizeof(EGapAlignOpType));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/gapinfo.c:101:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(new->num, old->num, (old->size)*sizeof(Int4));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/hsp2string.cpp:211:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(hsp, &reader->hsp, sizeof(BlastHSP));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/hsp2string.cpp:227: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(&reader->hsp, hsp, sizeof(BlastHSP));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/ncbistr_util.cpp:49:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(p, node->str.data(), node->str.size());
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/ncbistr_util.cpp:230: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, m_InternalDelim.data(), n);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:691: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[256]; // small temporary buffer on stack for appending zero char
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:693:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, str.data(), size);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1281: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  buffer[kBufSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1373: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  buffer[kBufSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1537: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  buffer[kBufSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1560: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  buffer[kBufSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1635: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  buffer[kBufSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1741:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer, num_start - 1, digs_pre_dot + 1);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1848: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 buffer[kMaxDoubleStringSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1888: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 buffer[kMaxDoubleStringSize];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1897:17:  [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(buffer, "-0");
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1901:13:  [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(buffer, "NaN");
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1904:13:  [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(buffer, "INF");
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1907:13:  [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(buffer, "-INF");
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1942: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(buf, buffer, n_copy);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2107: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 tmp[32];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2200: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 digits[32];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_util.cpp:725: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 val[3];
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/tempstr.hpp:385: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(copy, m_String, m_Length);
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:119:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
extract_hash_values(const u8* read,
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:137:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				u8 c = read[pos];
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:147:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			u8 c = read[pos];
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:157:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				u8 c = read[pos];
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:189:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const u8* read,
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:227:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const u8* read,
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:255:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read,
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:471:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const u8* read,
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.c:479:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read, 
data/mecat2-0.0+git20200428.f54c542+ds/src/algo/word_finder.h:82:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const u8* read,
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:347:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:392:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:401:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:441:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:480:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:499:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/assembly.cpp:510:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c:18:12:  [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).
	fwrite(b, strlen(b), 1, f);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c:142:7:  [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(longopts[i].name));
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c:153:7:  [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(longopts[i].name));
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/getopt.c:171:6:  [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(argv[optind]+2));
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:203:95:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void StringGraph::AddEdge(int in_node, int out_node, int len, int score, double identity, int read, int start, int end) {
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.cpp:223:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    e->read_ = read;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/fsa/string_graph.hpp:147:83:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void AddEdge(int in_node, int out_node, int len, int score, double identity, int read, int start, int end);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/hbndb/makehbndb.c:78: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(argv[i]) == 1) break;
data/mecat2-0.0+git20200428.f54c542+ds/src/app/map/hbn_align_one_volume.c:124: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).
                kputsn(line, strlen(line), out_buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_read.cpp:153:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read,
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_read.cpp:166:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        hit->qid, read, diff_data->qoff, diff_data->qend, diff_data->qas,
data/mecat2-0.0+git20200428.f54c542+ds/src/app/mecat2cns/cns_one_read.cpp:179:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        hit->qid, read, qoff, qend, ks_s(*qaln),
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:231: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).
    memcpy(p, input, strlen(input));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:232:10:  [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).
    p += strlen(input);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:268: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).
    memcpy(p, input, strlen(input));
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/build_db.c:269:10:  [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).
    p += strlen(input);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/fasta.c:115: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).
    int n = strlen(new_name) + 1;
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:41: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).
    size_t n = strlen(now);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/hbn_aux.c:305: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).
    int n = strlen(s);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:70:6:  [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).
	l = strlen(s);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:117: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).
		s->l += strlen(s->s + s->l);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:137:14:  [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 n = strlen(buf);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:220: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).
	return (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:220:47:  [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).
	return (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.c:225: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).
	return (char*)kmemmem(str, n, pat, strlen(pat), _prep);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/kstring.h:182: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).
	return kputsn(p, strlen(p), s);
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/partition_aux.c:24:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:10:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:42:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:72:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:84:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:145:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:157:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/corelib/seqdb.c:188:9:  [1] (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). Risk is low because the
  source is a constant character.
        strcat(path, ".");
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:347:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:392:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:401:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:441:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:480:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:499:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/assembly.cpp:510:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    std::string readseq = read_store_.GetSeq(read);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c:18:12:  [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).
	fwrite(b, strlen(b), 1, f);
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c:142:7:  [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(longopts[i].name));
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c:153:7:  [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(longopts[i].name));
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/getopt.c:171:6:  [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(argv[optind]+2));
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:203:95:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void StringGraph::AddEdge(int in_node, int out_node, int len, int score, double identity, int read, int start, int end) {
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.cpp:223:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    e->read_ = read;
data/mecat2-0.0+git20200428.f54c542+ds/src/fsa/string_graph.hpp:147:83:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void AddEdge(int in_node, int out_node, int len, int score, double identity, int read, int start, int end);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_message.c:54: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).
    if ( !filename || !(strlen(filename) > 0) ) {
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_options.c:467: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(filter_options->repeatFilterOptions->database) == 0)
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_options.c:999: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).
        for (i=0; i<strlen(opts->matrix); ++i)
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1681: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).
                int path_len = strlen(matrix_path);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1682: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).
                int buflen = path_len + strlen(sbp->name);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1688:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(full_matrix_path, matrix_path, buflen);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:1689:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
                strncat(full_matrix_path, sbp->name, buflen - path_len);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3812: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).
   ptr += strlen(ptr);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3820:14:  [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(ptr);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3844: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).
   ptr += strlen(ptr);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3868: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(ptr);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3952: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).
                     len = strlen(buffer);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3956: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).
                len = strlen(buffer);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/setup/blast_stat.c:3959: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).
                len = strlen(buffer);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1193: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).
        Uint4 coef_size = Uint4(strlen(coef));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:1894:17:  [1] (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 character.
                strcpy(buffer, "0");
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2175:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buffer,digits,digits_len);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2208:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buffer,digits, digits_len);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2234:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buffer_pos,digits_pos,digits_len);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2254:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buffer_pos,digits_pos,exp);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2257:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buffer_pos,digits_pos+exp,digits_len-exp);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2260:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buffer_pos,digits_pos,digits_len);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/numeric_str_interconv.cpp:2273:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buffer_pos,digits_pos, digits_len);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_cmp.hpp:673: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).
    size_t n = strlen(s1);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_cmp.hpp:674:14:  [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 (n != strlen(s2)) {
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_cmp.hpp:689: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).
    size_t n = strlen(s1);
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/str_cmp.hpp:690:14:  [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 (n != strlen(s2)) {
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/tempstr.hpp:230: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).
    return g_CTempString_plus(str1, strlen(str1),
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/tempstr.hpp:238: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).
                              str2, strlen(str2));
data/mecat2-0.0+git20200428.f54c542+ds/src/ncbi_blast/str_util/tempstr.hpp:421: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).
    m_Length = strlen(str);

ANALYSIS SUMMARY:

Hits = 532
Lines analyzed = 77761 in approximately 1.93 seconds (40284 lines/second)
Physical Source Lines of Code (SLOC) = 56107
Hits@level = [0] 293 [1]  95 [2] 336 [3]  16 [4]  85 [5]   0
Hits@level+ = [0+] 825 [1+] 532 [2+] 437 [3+] 101 [4+]  85 [5+]   0
Hits/KSLOC@level+ = [0+] 14.704 [1+] 9.48188 [2+] 7.78869 [3+] 1.80013 [4+] 1.51496 [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.