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/python-pysam-0.15.4+ds/bcftools/HMM.c Examining data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/HMM.h Examining data/python-pysam-0.15.4+ds/bcftools/bam2bcf_indel.c Examining data/python-pysam-0.15.4+ds/bcftools/bam2bcf_indel.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/bam_sample.c Examining data/python-pysam-0.15.4+ds/bcftools/bam_sample.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/bam_sample.h Examining data/python-pysam-0.15.4+ds/bcftools/bcftools.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/bcftools.pysam.h Examining data/python-pysam-0.15.4+ds/bcftools/bin.c Examining data/python-pysam-0.15.4+ds/bcftools/bin.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/bin.h Examining data/python-pysam-0.15.4+ds/bcftools/ccall.c Examining data/python-pysam-0.15.4+ds/bcftools/ccall.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/convert.h Examining data/python-pysam-0.15.4+ds/bcftools/em.c Examining data/python-pysam-0.15.4+ds/bcftools/em.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/filter.h Examining data/python-pysam-0.15.4+ds/bcftools/gvcf.h Examining data/python-pysam-0.15.4+ds/bcftools/hclust.c Examining data/python-pysam-0.15.4+ds/bcftools/hclust.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/hclust.h Examining data/python-pysam-0.15.4+ds/bcftools/khash_str2str.h Examining data/python-pysam-0.15.4+ds/bcftools/kheap.h Examining data/python-pysam-0.15.4+ds/bcftools/kmin.c Examining data/python-pysam-0.15.4+ds/bcftools/kmin.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/kmin.h Examining data/python-pysam-0.15.4+ds/bcftools/mw.h Examining data/python-pysam-0.15.4+ds/bcftools/ploidy.c Examining data/python-pysam-0.15.4+ds/bcftools/ploidy.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/ploidy.h Examining data/python-pysam-0.15.4+ds/bcftools/plugins/color-chrs.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/color-chrs.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/frameshifts.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/frameshifts.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/impute-info.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/impute-info.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/GTisec.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/GTisec.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/GTsubset.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/GTsubset.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/af-dist.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/af-dist.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/allele-length.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/allele-length.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/check-ploidy.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/check-ploidy.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/check-sparsity.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/check-sparsity.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/contrast.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/contrast.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/counts.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/counts.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/dosage.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/dosage.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fill-AN-AC.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fill-AN-AC.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fixploidy.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fixploidy.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fixref.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/fixref.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/guess-ploidy.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/guess-ploidy.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/gvcfz.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/gvcfz.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/indel-stats.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/indel-stats.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/isecGT.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/isecGT.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/missing2ref.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/missing2ref.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/parental-origin.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/parental-origin.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/remove-overlaps.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/remove-overlaps.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/setGT.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/setGT.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/smpl-stats.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/smpl-stats.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/split.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/split.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/tag2tag.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/tag2tag.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/trio-dnm.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/trio-dnm.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/trio-switch-rate.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/trio-switch-rate.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c Examining data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/prob1.c Examining data/python-pysam-0.15.4+ds/bcftools/prob1.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/prob1.h Examining data/python-pysam-0.15.4+ds/bcftools/rbuf.h Examining data/python-pysam-0.15.4+ds/bcftools/test/test-rbuf.c Examining data/python-pysam-0.15.4+ds/bcftools/test/test-rbuf.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c Examining data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/tsv2vcf.c Examining data/python-pysam-0.15.4+ds/bcftools/tsv2vcf.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/tsv2vcf.h Examining data/python-pysam-0.15.4+ds/bcftools/vcmp.c Examining data/python-pysam-0.15.4+ds/bcftools/vcmp.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcmp.h Examining data/python-pysam-0.15.4+ds/bcftools/bam2bcf.c Examining data/python-pysam-0.15.4+ds/bcftools/bam2bcf.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/bam2bcf.h Examining data/python-pysam-0.15.4+ds/bcftools/bcftools.h Examining data/python-pysam-0.15.4+ds/bcftools/call.h Examining data/python-pysam-0.15.4+ds/bcftools/cols.c Examining data/python-pysam-0.15.4+ds/bcftools/cols.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/cols.h Examining data/python-pysam-0.15.4+ds/bcftools/consensus.c Examining data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/convert.c Examining data/python-pysam-0.15.4+ds/bcftools/convert.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/csq.c Examining data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/filter.c Examining data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/gvcf.c Examining data/python-pysam-0.15.4+ds/bcftools/gvcf.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/hex.h Examining data/python-pysam-0.15.4+ds/bcftools/main.c Examining data/python-pysam-0.15.4+ds/bcftools/main.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/mcall.c Examining data/python-pysam-0.15.4+ds/bcftools/mcall.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/mpileup.c Examining data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/regidx.c Examining data/python-pysam-0.15.4+ds/bcftools/regidx.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/regidx.h Examining data/python-pysam-0.15.4+ds/bcftools/reheader.c Examining data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/smpl_ilist.c Examining data/python-pysam-0.15.4+ds/bcftools/smpl_ilist.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/smpl_ilist.h Examining data/python-pysam-0.15.4+ds/bcftools/tabix.c Examining data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/variantkey.h Examining data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfbuf.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfbuf.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfbuf.h Examining data/python-pysam-0.15.4+ds/bcftools/vcfcall.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfcall.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfcnv.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfcnv.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfconcat.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfconcat.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcffilter.c Examining data/python-pysam-0.15.4+ds/bcftools/vcffilter.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfindex.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfindex.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfisec.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfquery.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfquery.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfroh.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfroh.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfsom.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfsort.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfstats.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfview.c Examining data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/version.c Examining data/python-pysam-0.15.4+ds/bcftools/version.c.pysam.c Examining data/python-pysam-0.15.4+ds/bcftools/version.h Examining data/python-pysam-0.15.4+ds/import/pysam.c Examining data/python-pysam-0.15.4+ds/import/pysam.h Examining data/python-pysam-0.15.4+ds/pysam/cbcftools_util.h Examining data/python-pysam-0.15.4+ds/pysam/csamtools_util.h Examining data/python-pysam-0.15.4+ds/pysam/htslib_util.c Examining data/python-pysam-0.15.4+ds/pysam/pysam_stream.h Examining data/python-pysam-0.15.4+ds/pysam/pysam_util.c Examining data/python-pysam-0.15.4+ds/pysam/pysam_util.h Examining data/python-pysam-0.15.4+ds/pysam/htslib_util.h Examining data/python-pysam-0.15.4+ds/samtools/bam_color.c Examining data/python-pysam-0.15.4+ds/samtools/bam_color.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_endian.h Examining data/python-pysam-0.15.4+ds/samtools/bam_flags.c Examining data/python-pysam-0.15.4+ds/samtools/bam_flags.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c Examining data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/lz4/lz4.h Examining data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c Examining data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/sample.c Examining data/python-pysam-0.15.4+ds/samtools/sample.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/sample.h Examining data/python-pysam-0.15.4+ds/samtools/samtools.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/samtools.pysam.h Examining data/python-pysam-0.15.4+ds/samtools/stats_isize.h Examining data/python-pysam-0.15.4+ds/samtools/test/merge/test_rtrans_build.c Examining data/python-pysam-0.15.4+ds/samtools/test/merge/test_rtrans_build.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c Examining data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c Examining data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_count_rg.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_count_rg.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_expand_format_string.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_expand_format_string.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c Examining data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/tview/test_get_rg_sample.c Examining data/python-pysam-0.15.4+ds/samtools/test/tview/test_get_rg_sample.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/test.c Examining data/python-pysam-0.15.4+ds/samtools/test/test.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/test/test.h Examining data/python-pysam-0.15.4+ds/samtools/bam.c Examining data/python-pysam-0.15.4+ds/samtools/bam.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam.h Examining data/python-pysam-0.15.4+ds/samtools/bam2bcf.c Examining data/python-pysam-0.15.4+ds/samtools/bam2bcf.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam2bcf.h Examining data/python-pysam-0.15.4+ds/samtools/bam2bcf_indel.c Examining data/python-pysam-0.15.4+ds/samtools/bam2bcf_indel.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam2depth.c Examining data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c Examining data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_aux.c Examining data/python-pysam-0.15.4+ds/samtools/bam_aux.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_cat.c Examining data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_fastq.c Examining data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_index.c Examining data/python-pysam-0.15.4+ds/samtools/bam_index.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_lpileup.c Examining data/python-pysam-0.15.4+ds/samtools/bam_lpileup.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_lpileup.h Examining data/python-pysam-0.15.4+ds/samtools/bam_markdup.c Examining data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_mate.c Examining data/python-pysam-0.15.4+ds/samtools/bam_mate.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_md.c Examining data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_plbuf.c Examining data/python-pysam-0.15.4+ds/samtools/bam_plbuf.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_plbuf.h Examining data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c Examining data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_quickcheck.c Examining data/python-pysam-0.15.4+ds/samtools/bam_quickcheck.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_reheader.c Examining data/python-pysam-0.15.4+ds/samtools/bam_reheader.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_rmdup.c Examining data/python-pysam-0.15.4+ds/samtools/bam_rmdup.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_rmdupse.c Examining data/python-pysam-0.15.4+ds/samtools/bam_rmdupse.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_sort.c Examining data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_split.c Examining data/python-pysam-0.15.4+ds/samtools/bam_split.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bam_stat.c Examining data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bamshuf.c Examining data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bamtk.c Examining data/python-pysam-0.15.4+ds/samtools/bamtk.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bedcov.c Examining data/python-pysam-0.15.4+ds/samtools/bedcov.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bedidx.c Examining data/python-pysam-0.15.4+ds/samtools/bedidx.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/bedidx.h Examining data/python-pysam-0.15.4+ds/samtools/coverage.c Examining data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/cut_target.c Examining data/python-pysam-0.15.4+ds/samtools/cut_target.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/dict.c Examining data/python-pysam-0.15.4+ds/samtools/dict.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/faidx.c Examining data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/padding.c Examining data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/phase.c Examining data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/sam.c Examining data/python-pysam-0.15.4+ds/samtools/sam.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/sam.h Examining data/python-pysam-0.15.4+ds/samtools/sam_opts.c Examining data/python-pysam-0.15.4+ds/samtools/sam_opts.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/sam_opts.h Examining data/python-pysam-0.15.4+ds/samtools/sam_utils.c Examining data/python-pysam-0.15.4+ds/samtools/sam_utils.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/sam_view.c Examining data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/samtools.h Examining data/python-pysam-0.15.4+ds/samtools/stats.c Examining data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/stats_isize.c Examining data/python-pysam-0.15.4+ds/samtools/stats_isize.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/tmp_file.c Examining data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c Examining data/python-pysam-0.15.4+ds/samtools/tmp_file.h Examining data/python-pysam-0.15.4+ds/samtools/version.h Examining data/python-pysam-0.15.4+ds/win32/getopt.c Examining data/python-pysam-0.15.4+ds/win32/getopt.h Examining data/python-pysam-0.15.4+ds/win32/stdint.h Examining data/python-pysam-0.15.4+ds/win32/unistd.h FINAL RESULTS: data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:298:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. int ret = chmod(tmp, S_IRUSR|S_IWUSR|S_IXUSR); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:300:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. int ret = chmod(tmp, S_IRUSR|S_IWUSR|S_IXUSR); data/python-pysam-0.15.4+ds/bcftools/hex.h:58:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. return sprintf(str, "%016" PRIx64, n); data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c:79:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(rsid, "%08" PRIx32, (uint32_t)strtoul(ptr, NULL, 10)); data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c.pysam.c:81:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(rsid, "%08" PRIx32, (uint32_t)strtoul(ptr, NULL, 10)); data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c:233:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(args->info_pos,"%s_POS", optarg); data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c:234:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(args->info_r2,"%s_R2", optarg); data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c.pysam.c:235:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(args->info_pos,"%s_POS", optarg); data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c.pysam.c:236:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(args->info_r2,"%s_R2", optarg); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:76:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir, argv[1]); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:78:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, dir); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:79: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, FILE_VKRS); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:85:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, dir); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:86: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, FILE_RSVK); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:92:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, dir); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:93: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, FILE_NRVK); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:78:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir, argv[1]); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:80:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, dir); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:81: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, FILE_VKRS); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:87:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, dir); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:88: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, FILE_RSVK); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:94:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, dir); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:95: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, FILE_NRVK); data/python-pysam-0.15.4+ds/bcftools/tabix.c:98:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strcpy(fn, argv[optind]), min_shift <= 0? ".tbi" : ".csi"); data/python-pysam-0.15.4+ds/bcftools/tabix.c:98:20: [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). strcat(strcpy(fn, argv[optind]), min_shift <= 0? ".tbi" : ".csi"); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:100:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strcpy(fn, argv[optind]), min_shift <= 0? ".tbi" : ".csi"); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:100:20: [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). strcat(strcpy(fn, argv[optind]), min_shift <= 0? ".tbi" : ".csi"); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:46: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, format, ap); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:54: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, format, ap); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:61: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, format, ap); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:280:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line,"%s\t%d\t%d\n",chr,start-1,end); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:284:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line,"%s\t%d\t%d\n",chr,start,end); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:288:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line,"%s:%d-%d\n",chr,start,end); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:48: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(bcftools_stderr, format, ap); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:56: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(bcftools_stderr, format, ap); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:63: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(bcftools_stderr, format, ap); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:282:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line,"%s\t%d\t%d\n",chr,start-1,end); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:286:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line,"%s\t%d\t%d\n",chr,start,end); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:290:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line,"%s:%d-%d\n",chr,start,end); data/python-pysam-0.15.4+ds/bcftools/variantkey.h:152:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. return sprintf(chrom, "%" PRIu8, code); data/python-pysam-0.15.4+ds/bcftools/variantkey.h:155:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. return sprintf(chrom, "%s", map[(code - 23)]); data/python-pysam-0.15.4+ds/bcftools/vcfcnv.c:324:15: [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. int ret = system(cmd); data/python-pysam-0.15.4+ds/bcftools/vcfcnv.c.pysam.c:326:15: [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. int ret = system(cmd); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c:64:15: [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. int ret = system(cmd); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c:463:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, "SC\t%s\t%"PRId64, args->gt_hdr->id[BCF_DT_CTG][gt_line->rid].key, (int64_t) gt_line->pos+1); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c.pysam.c:66:15: [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. int ret = system(cmd); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c.pysam.c:465:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, "SC\t%s\t%"PRId64, args->gt_hdr->id[BCF_DT_CTG][gt_line->rid].key, (int64_t) gt_line->pos+1); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:74:13: [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. int n = vsnprintf(NULL, 0, fmt, ap) + 2; data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:79: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(path, n, fmt, ap); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:110:13: [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. int n = vsnprintf(NULL, 0, fmt, ap) + 2; data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:115: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(str, n, fmt, ap); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:76:13: [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. int n = vsnprintf(NULL, 0, fmt, ap) + 2; data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:81: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(path, n, fmt, ap); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:112:13: [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. int n = vsnprintf(NULL, 0, fmt, ap) + 2; data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:117: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(str, n, fmt, ap); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:520:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp,"%s:%s",clash_prefix,name); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:2207:63: [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. for (j=maux->buf[i].beg; j<maux->buf[i].end; j++) fprintf(stderr," %s:%"PRId64,chr,(int64_t) maux->buf[i].lines[j]->pos+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:2215:37: [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. if ( maux->gvcf[i].active ) fprintf(stderr,"\tpos,end=%"PRId64",%"PRId64, (int64_t) maux->gvcf[i].line->pos+1,(int64_t) maux->gvcf[i].end+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:522:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp,"%s:%s",clash_prefix,name); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:2209:63: [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. for (j=maux->buf[i].beg; j<maux->buf[i].end; j++) fprintf(bcftools_stderr," %s:%"PRId64,chr,(int64_t) maux->buf[i].lines[j]->pos+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:2217:37: [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. if ( maux->gvcf[i].active ) fprintf(bcftools_stderr,"\tpos,end=%"PRId64",%"PRId64, (int64_t) maux->gvcf[i].line->pos+1,(int64_t) maux->gvcf[i].end+1); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:472: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. fprintf(stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:494: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. fprintf(stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:517: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. fprintf(stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:678: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. fprintf(stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:708: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. fprintf(stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:739: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. fprintf(stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:474: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. fprintf(bcftools_stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:496: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. fprintf(bcftools_stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:519: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. fprintf(bcftools_stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:680: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. fprintf(bcftools_stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:710: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. fprintf(bcftools_stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:741: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. fprintf(bcftools_stderr, \ data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:92:13: [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. int n = vsnprintf(NULL, 0, fmt, ap) + 2; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:97: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(str, n, fmt, ap); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:94:13: [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. int n = vsnprintf(NULL, 0, fmt, ap) + 2; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:99: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(str, n, fmt, ap); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:88: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, format, ap); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:293:25: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). int ret = mkdir(mktemp(args->tmp_dir), 0700); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:90: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(bcftools_stderr, format, ap); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:295:25: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). int ret = mkdir(mktemp(args->tmp_dir), 0700); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c:1381:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt,usr->tag,id,val,usr->vals_ts[j]+usr->vals_tv[j],usr->vals_ts[j],usr->vals_tv[j]); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c:1476:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. else printf("\t"NA_STRING); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c:1592:25: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("\t%"PRId64, stats[i].gt2gt[j][k]); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c:1383:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(bcftools_stdout, fmt,usr->tag,id,val,usr->vals_ts[j]+usr->vals_tv[j],usr->vals_ts[j],usr->vals_tv[j]); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c:1478:22: [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. else fprintf(bcftools_stdout, "\t"NA_STRING); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c:1594: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. fprintf(bcftools_stdout, "\t%"PRId64, stats[i].gt2gt[j][k]); data/python-pysam-0.15.4+ds/bcftools/version.c:43: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, format, ap); data/python-pysam-0.15.4+ds/bcftools/version.c:53: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, format, ap); data/python-pysam-0.15.4+ds/bcftools/version.c.pysam.c:45: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(bcftools_stderr, format, ap); data/python-pysam-0.15.4+ds/bcftools/version.c.pysam.c:55: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(bcftools_stderr, format, ap); data/python-pysam-0.15.4+ds/samtools/bam2depth.c:297: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. fprintf(file_out, "\t%"PRIhts_pos, last_pos+1); data/python-pysam-0.15.4+ds/samtools/bam2depth.c:315:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, "\t%"PRIhts_pos, last_pos+1); data/python-pysam-0.15.4+ds/samtools/bam2depth.c:326:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, "\t%"PRIhts_pos, pos+1); // a customized printf() would be faster data/python-pysam-0.15.4+ds/samtools/bam2depth.c:355:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, "\t%"PRIhts_pos, last_pos+1); data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:299: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. fprintf(file_out, "\t%"PRIhts_pos, last_pos+1); data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:317:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, "\t%"PRIhts_pos, last_pos+1); data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:328:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, "\t%"PRIhts_pos, pos+1); // a customized fprintf(samtools_stdout, ) would be faster data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:357:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, "\t%"PRIhts_pos, last_pos+1); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:460: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). strcat(state->index_sequence, INDEX_SEPARATOR); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:461: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). strcat(state->index_sequence, sub_tag); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:462: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). strcat(state->index_sequence, INDEX_SEPARATOR); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:463: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). strcat(state->index_sequence, sub_tag); data/python-pysam-0.15.4+ds/samtools/bam_index.c:232:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("%s\t%"PRId64, sam_hdr_tid2name(header, i), (int64_t) sam_hdr_tid2len(header, i)); data/python-pysam-0.15.4+ds/samtools/bam_index.c.pysam.c:234:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(samtools_stdout, "%s\t%"PRId64, sam_hdr_tid2name(header, i), (int64_t) sam_hdr_tid2len(header, i)); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:854:37: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(pileup_fp, "%"PRId64, (int64_t) p->b->core.pos + 1); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:868:37: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(pileup_fp, "%"PRId64, (int64_t) p->b->core.mpos + 1); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1316:40: [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. while (!feof(fp_rg) && fscanf(fp_rg, "%s", buf) > 0) // this is not a good style, but forgive me... data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:856:37: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(pileup_fp, "%"PRId64, (int64_t) p->b->core.pos + 1); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:870:37: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(pileup_fp, "%"PRId64, (int64_t) p->b->core.mpos + 1); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1318:40: [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. while (!feof(fp_rg) && fscanf(fp_rg, "%s", buf) > 0) // this is not a good style, but forgive me... data/python-pysam-0.15.4+ds/samtools/bam_quickcheck.c:77:35: [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. if (!quiet || verbose >= (v)) fprintf(stderr, (msg), (arg1)) data/python-pysam-0.15.4+ds/samtools/bam_quickcheck.c.pysam.c:79:35: [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. if (!quiet || verbose >= (v)) fprintf(samtools_stderr, (msg), (arg1)) data/python-pysam-0.15.4+ds/samtools/bam_reheader.c:484:16: [4] (shell) popen: 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. FILE* nh = popen(command, "r"); data/python-pysam-0.15.4+ds/samtools/bam_reheader.c.pysam.c:486:16: [4] (shell) popen: 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. FILE* nh = popen(command, "r"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1967:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s.%.4d.bam", w->prefix, w->index); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2223:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fns[i], "%s.%.4d.bam", prefix, i); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2263:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnout, "%s.bam", prefix); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1969:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s.%.4d.bam", w->prefix, w->index); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2225:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fns[i], "%s.%.4d.bam", prefix, i); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2265:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnout, "%s.bam", prefix); data/python-pysam-0.15.4+ds/samtools/bamshuf.c:233:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnw, "%s.bam", pre); // "wb" above makes BAM the default data/python-pysam-0.15.4+ds/samtools/bamshuf.c:235:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnw, "%s.%s", pre, hts_format_file_extension(&ga->out)); data/python-pysam-0.15.4+ds/samtools/bamshuf.c:278:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnt[i], "%s.%04d.bam", pre, counter++); data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:235:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnw, "%s.bam", pre); // "wb" above makes BAM the default data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:237:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnw, "%s.%s", pre, hts_format_file_extension(&ga->out)); data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:280:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnt[i], "%s.%04d.bam", pre, counter++); data/python-pysam-0.15.4+ds/samtools/bedidx.c:284: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. If the scanf format is influenceable by an attacker, it's exploitable. num = sscanf(ref_end + 1, "%"SCNu64" %"SCNu64, &beg, &end); data/python-pysam-0.15.4+ds/samtools/bedidx.c:531: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(reg, regs[i]); data/python-pysam-0.15.4+ds/samtools/bedidx.c.pysam.c:286: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. If the scanf format is influenceable by an attacker, it's exploitable. num = sscanf(ref_end + 1, "%"SCNu64" %"SCNu64, &beg, &end); data/python-pysam-0.15.4+ds/samtools/bedidx.c.pysam.c:533: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(reg, regs[i]); data/python-pysam-0.15.4+ds/samtools/coverage.c:156:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %*s%*s", len+padding, text, padding-1+padding_ex, " "); data/python-pysam-0.15.4+ds/samtools/coverage.c:158:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s", text); data/python-pysam-0.15.4+ds/samtools/coverage.c:170:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%.*f%s", i, base_pairs, units[i]); data/python-pysam-0.15.4+ds/samtools/coverage.c:256:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, VERTICAL_LINE); data/python-pysam-0.15.4+ds/samtools/coverage.c:269:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, VERTICAL_LINE); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:158:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %*s%*s", len+padding, text, padding-1+padding_ex, " "); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:160:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s", text); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:172:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%.*f%s", i, base_pairs, units[i]); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:258:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, VERTICAL_LINE); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:271:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(file_out, VERTICAL_LINE); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:298: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. fprintf(stderr, __FILE__ ": "); \ data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:299: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. fprintf(stderr, __VA_ARGS__); \ data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:300: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. fprintf(samtools_stderr, __FILE__ ": "); \ data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:301: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. fprintf(samtools_stderr, __VA_ARGS__); \ data/python-pysam-0.15.4+ds/samtools/padding.c:475: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(out_mode, tmp); data/python-pysam-0.15.4+ds/samtools/padding.c:510: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(out_mode, sam_open_mode(wmode, fn_out, NULL)==0 ? wmode : "b"); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:477: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(out_mode, tmp); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:512: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(out_mode, sam_open_mode(wmode, fn_out, NULL)==0 ? wmode : "b"); data/python-pysam-0.15.4+ds/samtools/sam.c:134:12: [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). strcat(strcpy(fn_list, fn_ref), ".fai"); data/python-pysam-0.15.4+ds/samtools/sam.c:135: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(fn_list, R_OK) == -1) { // fn_list is unreadable data/python-pysam-0.15.4+ds/samtools/sam.c:136: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(fn_ref, R_OK) == -1) { data/python-pysam-0.15.4+ds/samtools/sam.c.pysam.c:136:12: [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). strcat(strcpy(fn_list, fn_ref), ".fai"); data/python-pysam-0.15.4+ds/samtools/sam.c.pysam.c:137: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(fn_list, R_OK) == -1) { // fn_list is unreadable data/python-pysam-0.15.4+ds/samtools/sam.c.pysam.c:138: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(fn_ref, R_OK) == -1) { data/python-pysam-0.15.4+ds/samtools/sam_opts.c:77:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ref, "reference=%s", optarg); data/python-pysam-0.15.4+ds/samtools/sam_opts.c.pysam.c:79:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ref, "reference=%s", optarg); data/python-pysam-0.15.4+ds/samtools/sam_utils.c:40: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, format, args); data/python-pysam-0.15.4+ds/samtools/sam_utils.c:128:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn_idx, "%s.%s", fn, suffix); data/python-pysam-0.15.4+ds/samtools/sam_utils.c.pysam.c:42: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(samtools_stderr, format, args); data/python-pysam-0.15.4+ds/samtools/sam_utils.c.pysam.c:130:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn_idx, "%s.%s", fn, suffix); data/python-pysam-0.15.4+ds/samtools/sam_view.c:482: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(out_mode, tmp); data/python-pysam-0.15.4+ds/samtools/sam_view.c:483: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(out_un_mode, tmp); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:484: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(out_mode, tmp); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:485: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(out_un_mode, tmp); data/python-pysam-0.15.4+ds/samtools/stats.c:1851:15: [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. If the scanf format is influenceable by an attacker, it's exploitable. if ( (sscanf(&line.s[i+1],"%"SCNd64" %"SCNd64, &stats->regions[tid].pos[npos].beg, &stats->regions[tid].pos[npos].end))!=2 ) error("Could not parse the region [%s]\n", &line.s[i+1]); data/python-pysam-0.15.4+ds/samtools/stats.c:2052: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(stderr, format, ap); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:1853:15: [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. If the scanf format is influenceable by an attacker, it's exploitable. if ( (sscanf(&line.s[i+1],"%"SCNd64" %"SCNd64, &stats->regions[tid].pos[npos].beg, &stats->regions[tid].pos[npos].end))!=2 ) error("Could not parse the region [%s]\n", &line.s[i+1]); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:2054: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(samtools_stderr, format, ap); data/python-pysam-0.15.4+ds/samtools/test/test.c:44:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __FILE__": error reopening %s: %s\n", data/python-pysam-0.15.4+ds/samtools/test/test.c.pysam.c:46:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(samtools_stderr, __FILE__": error reopening %s: %s\n", data/python-pysam-0.15.4+ds/samtools/tmp_file.c:51: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(stderr, fmt, argp); data/python-pysam-0.15.4+ds/samtools/tmp_file.c:108:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp->name, "%s.%d", tmp_name, count); data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c:53: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(samtools_stderr, fmt, argp); data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c:110:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp->name, "%s.%d", tmp_name, count); data/python-pysam-0.15.4+ds/win32/unistd.h:21: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. #define access _access data/python-pysam-0.15.4+ds/bcftools/consensus.c:854:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?s:1Ii:e:H:f:o:m:c:M:p:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:856:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?s:1Ii:e:H:f:o:m:c:M:p:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/csq.c:4126:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hr:R:t:T:i:e:f:o:O:g:s:S:p:qc:ln:bv:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:4128:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hr:R:t:T:i:e:f:o:O:g:s:S:p:qc:ln:bv:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/filter.c:310: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. kputs(getenv("HOMEDRIVE"), &str); data/python-pysam-0.15.4+ds/bcftools/filter.c:311: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. kputs(getenv("HOMEPATH"), &str); data/python-pysam-0.15.4+ds/bcftools/filter.c:314: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. kputs(getenv("HOME"), &str); data/python-pysam-0.15.4+ds/bcftools/filter.c:337:21: [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. char *var = getenv(path+1); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:312: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. kputs(getenv("HOMEDRIVE"), &str); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:313: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. kputs(getenv("HOMEPATH"), &str); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:316: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. kputs(getenv("HOME"), &str); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:339:21: [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. char *var = getenv(path+1); data/python-pysam-0.15.4+ds/bcftools/mpileup.c:991:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Ag:f:r:R:q:Q:C:Bd:L:b:P:po:e:h:Im:F:EG:6O:xa:s:S:t:T:",lopts,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:993:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Ag:f:r:R:q:Q:C:Bd:L:b:P:po:e:h:Im:F:EG:6O:xa:s:S:t:T:",lopts,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/plugins/GTisec.c:131:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?mvHh",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/GTisec.c.pysam.c:133:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?mvHh",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/GTsubset.c:98:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?s:h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/GTsubset.c.pysam.c:100:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?s:h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c:145:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hs:t:f:d:a:v:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c.pysam.c:147:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hs:t:f:d:a:v:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/af-dist.c:95:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:d:p:l:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/af-dist.c.pysam.c:97:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:d:p:l:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/check-sparsity.c:242:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:n:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/check-sparsity.c.pysam.c:244:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:n:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/color-chrs.c:164:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:u:p:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/color-chrs.c.pysam.c:166:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:u:p:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/contrast.c:459:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "O:o:i:e:r:R:t:T:0:1:a:f:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/contrast.c.pysam.c:461:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "O:o:i:e:r:R:t:T:0:1:a:f:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/dosage.c:236:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "t:?h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/dosage.c.pysam.c:238:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "t:?h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c:106:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "c:f:?h:i:e:N",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c.pysam.c:108:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "c:f:?h:i:e:N",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c:406:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:dS:l",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c.pysam.c:408:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:dS:l",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fixploidy.c:129:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:s:p:d:f:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fixploidy.c.pysam.c:131:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:s:p:d:f:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fixref.c:190:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hf:m:di:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/fixref.c.pysam.c:192:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hf:m:di:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/frameshifts.c:69:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "e:?h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/frameshifts.c.pysam.c:71:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "e:?h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/guess-ploidy.c:423:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:e:ig:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/guess-ploidy.c.pysam.c:425:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:e:ig:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/gvcfz.c:328:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:T:o:O:g:i:e:a",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/gvcfz.c.pysam.c:330:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:T:o:O:g:i:e:a",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/indel-stats.c:702:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:s:i:e:r:R:t:T:c:p:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/indel-stats.c.pysam.c:704:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:s:i:e:r:R:t:T:c:p:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/isecGT.c:88:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:O:r:R:t:T:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/isecGT.c.pysam.c:90:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:O:r:R:t:T:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c:317:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:T:l:cdr:R:o:O:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c.pysam.c:319:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?ht:T:l:cdr:R:o:O:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/missing2ref.c:73:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "mp?h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/missing2ref.c.pysam.c:75:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "mp?h",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/parental-origin.c:351:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?e:i:p:r:t:dgb:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/parental-origin.c.pysam.c:353:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?e:i:p:r:t:dgb:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c:220:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:T:l:o:O:a:f:i:e:n:w:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c.pysam.c:222:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:T:l:o:O:a:f:i:e:n:w:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/remove-overlaps.c:171:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "r:R:t:T:o:O:i:e:vpd",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/remove-overlaps.c.pysam.c:173:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "r:R:t:T:o:O:i:e:vpd",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/setGT.c:192:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hn:t:i:e:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/setGT.c.pysam.c:194:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hn:t:i:e:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/smpl-stats.c:447:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:s:i:e:r:R:t:T:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/smpl-stats.c.pysam.c:449:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:s:i:e:r:R:t:T:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:856:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:O:i:e:r:R:t:T:lS:s:c:p:a:f:dA:x",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:858:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "o:O:i:e:r:R:t:T:lS:s:c:p:a:f:dA:x",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/split.c:400:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:T:o:O:i:e:k:S:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/split.c.pysam.c:402:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "vr:R:t:T:o:O:i:e:k:S:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/tag2tag.c:96:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hrt:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/tag2tag.c.pysam.c:98:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hrt:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/trio-dnm.c:394:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "p:P:o:O:s:i:e:r:R:t:T:m:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/trio-dnm.c.pysam.c:396:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "p:P:o:O:s:i:e:r:R:t:T:m:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c:707:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "P:p:o:s:i:e:r:R:t:T:a:d:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c.pysam.c:709:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "P:p:o:s:i:e:r:R:t:T:a:d:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/trio-switch-rate.c:160:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hp:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/plugins/trio-switch-rate.c.pysam.c:162:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?hp:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/reheader.c:676:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "s:h:o:f:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c:678:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "s:h:o:f:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/tabix.c:38:17: [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. while ((c = getopt(argc, argv, "0fap:s:b:e:S:c:m:")) >= 0) data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:40:17: [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. while ((c = getopt(argc, argv, "0fap:s:b:e:S:c:m:")) >= 0) data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:175:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. long int b = random(), e = random(); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:175:32: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. long int b = random(), e = random(); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:408:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hvs:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:437:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(seed); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:177:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. long int b = random(), e = random(); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:177:32: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. long int b = random(), e = random(); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:410:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hvs:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:439:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(seed); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c:2680:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:?o:O:r:R:a:x:c:i:e:S:s:I:m:kl:f",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c.pysam.c:2682:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:?o:O:r:R:a:x:c:i:e:S:s:I:m:kl:f",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfcall.c:963:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?o:O:r:R:s:S:t:T:ANMV:vcmp:C:n:P:f:ig:XYF:G:", loptions, NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfcall.c.pysam.c:965:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?o:O:r:R:s:S:t:T:ANMV:vcmp:C:n:P:f:ig:XYF:G:", loptions, NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfcnv.c:1292:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?r:R:t:T:s:o:p:l:T:c:b:P:x:e:O:W:f:a:L:d:k:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfcnv.c.pysam.c:1294:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?r:R:t:T:s:o:p:l:T:c:b:P:x:e:O:W:f:a:L:d:k:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfconcat.c:899:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:?o:O:f:alq:Dd:r:R:cnv:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfconcat.c.pysam.c:901:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:?o:O:f:alq:Dd:r:R:cnv:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1478:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?h:r:R:s:S:t:T:i:e:g:G:o:O:c:f:H:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1480:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "?h:r:R:s:S:t:T:i:e:g:G:o:O:c:f:H:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcffilter.c:466:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "e:i:t:T:r:R:h?s:m:o:O:g:G:S:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcffilter.c.pysam.c:468:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "e:i:t:T:r:R:h?s:m:o:O:g:G:S:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c:765:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hg:p:s:S:Hr:R:at:T:G:c:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c.pysam.c:767:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hg:p:s:S:Hr:R:at:T:G:c:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfindex.c:144:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "ctfm:sno:", loptions, NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfindex.c.pysam.c:146:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "ctfm:sno:", loptions, NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:531:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hc:r:R:p:n:w:t:T:Cf:o:O:i:e:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:533:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hc:r:R:p:n:w:t:T:Cf:o:O:i:e:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:2628:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hm:f:r:R:o:O:i:l:g:F:0",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:2630:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hm:f:r:R:o:O:i:l:g:F:0",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:2022:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hr:R:f:w:Dd:o:O:c:m:t:T:sN",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:2024:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hr:R:f:w:Dd:o:O:c:m:t:T:sN",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:204:18: [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. char *path = getenv("BCFTOOLS_PLUGINS"); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:271:11: [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. if ( !getenv("BCFTOOLS_PLUGINS") ) data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:279:17: [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. getenv("BCFTOOLS_PLUGINS") data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:573:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "-v",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:634:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?o:O:r:R:t:T:li:e:vV",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:206:18: [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. char *path = getenv("BCFTOOLS_PLUGINS"); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:273:11: [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. if ( !getenv("BCFTOOLS_PLUGINS") ) data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:281:17: [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. getenv("BCFTOOLS_PLUGINS") data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:575:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "-v",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:636:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?o:O:r:R:t:T:li:e:vV",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfquery.c:273:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hlr:R:f:a:s:S:Ht:T:c:v:i:e:o:u",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfquery.c.pysam.c:275:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hlr:R:f:a:s:S:Ht:T:c:v:i:e:o:u",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfroh.c:1149:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?r:R:t:T:H:a:s:S:m:M:G:Ia:e:V:b:O:o:i",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfroh.c.pysam.c:1151:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h?r:R:t:T:H:a:s:S:m:M:G:Ia:e:V:b:O:o:i",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:360:21: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. som->w[i] = random(); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:511:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(args->rand_seed); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:675:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "htcp:n:r:b:l:s:f:d:m:e",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:362:21: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. som->w[i] = random(); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:513:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(args->rand_seed); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:677:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "htcp:n:r:b:l:s:f:d:m:e",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:332:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "m:T:O:o:h?",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:334:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "m:T:O:o:h?",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfstats.c:1765:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hc:r:R:e:s:S:d:i:t:T:F:f:1u:vIE:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c:1767:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hc:r:R:e:s:S:d:i:t:T:F:f:1u:vIE:",loptions,NULL)) >= 0) { data/python-pysam-0.15.4+ds/bcftools/vcfview.c:594:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "l:t:T:r:R:o:O:s:S:Gf:knv:V:m:M:auUhHc:C:Ii:e:xXpPq:Q:g:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:596:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "l:t:T:r:R:o:O:s:S:Gf:knv:V:m:M:auUhHc:C:Ii:e:xXpPq:Q:g:",loptions,NULL)) >= 0) data/python-pysam-0.15.4+ds/samtools/bam2depth.c:132:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((n = getopt_long(argc, argv, "r:b:Xq:Q:l:f:am:d:Ho:g:G:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:134:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((n = getopt_long(argc, argv, "r:b:Xq:Q:l:f:am:d:Ho:g:G:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:201:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((n = getopt_long(argc, argv, "r:R:m:o:O:l:h@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:203:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((n = getopt_long(argc, argv, "r:R:m:o:O:l:h@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_cat.c:484:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:o:b:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:486:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:o:b:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:569:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "0:1:2:o:f:F:G:niNOs:c:tT:v:@:", lopts, NULL)) > 0) { data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:571:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "0:1:2:o:f:F:G:niNOs:c:tT:v:@:", lopts, NULL)) > 0) { data/python-pysam-0.15.4+ds/samtools/bam_index.c:62:17: [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. while ((c = getopt(argc, argv, "bcm:@:")) >= 0) data/python-pysam-0.15.4+ds/samtools/bam_index.c:187:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_index.c.pysam.c:64:17: [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. while ((c = getopt(argc, argv, "bcm:@:")) >= 0) data/python-pysam-0.15.4+ds/samtools/bam_index.c.pysam.c:189:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:1780:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "rsl:StT:O:@:f:d:ncm:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:1782:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "rsl:StT:O:@:f:d:ncm:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_mate.c:440:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "rpcmO:@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_mate.c.pysam.c:442:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "rpcmO:@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_md.c:208:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "EqQreuNhbSC:n:Ad@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:210:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "EqQreuNhbSC:n:Ad@:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1233:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Agf:r:l:q:Q:uRC:BDSd:L:b:P:po:e:h:Im:F:EG:6OsVvxXt:a",lopts,NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1235:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Agf:r:l:q:Q:uRC:BDSd:L:b:P:po:e:h:Im:F:EG:6OsVvxXt:a",lopts,NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_quickcheck.c:86:19: [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. while ((opt = getopt(argc, argv, optstring)) != -1) { data/python-pysam-0.15.4+ds/samtools/bam_quickcheck.c.pysam.c:88:19: [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. while ((opt = getopt(argc, argv, optstring)) != -1) { data/python-pysam-0.15.4+ds/samtools/bam_reheader.c:549:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hiPc:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_reheader.c.pysam.c:551:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hiPc:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_rmdup.c:281:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "sS", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_rmdup.c.pysam.c:283:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "sS", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_sort.c:300:43: [3] (random) lrand48: 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. ksprintf(dest, "%s-%0lX", prefix, lrand48()); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1375:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:nru1R:f@:l:cps:b:O:t:X", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2318:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "l:m:no:O:T:@:t:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:302:43: [3] (random) lrand48: 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. ksprintf(dest, "%s-%0lX", prefix, lrand48()); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1377:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h:nru1R:f@:l:cps:b:O:t:X", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2320:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "l:m:no:O:T:@:t:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_split.c:121: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, optstring, lopts, NULL)) != -1) { data/python-pysam-0.15.4+ds/samtools/bam_split.c.pysam.c:123: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, optstring, lopts, NULL)) != -1) { data/python-pysam-0.15.4+ds/samtools/bam_stat.c:257:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "@:O:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c:259:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "@:O:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bamshuf.c:593:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "n:l:uOo:@:fr:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:595:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "n:l:uOo:@:fr:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bedcov.c:83:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Q:Xj", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/bedcov.c.pysam.c:85:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Q:Xj", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/coverage.c:364:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Ao:L:q:Q:hHw:r:b:m", lopts, NULL)) != -1) { data/python-pysam-0.15.4+ds/samtools/coverage.c:422:35: [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. const char* env_columns = getenv("COLUMNS"); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:366:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Ao:L:q:Q:hHw:r:b:m", lopts, NULL)) != -1) { data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:424:35: [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. const char* env_columns = getenv("COLUMNS"); data/python-pysam-0.15.4+ds/samtools/cut_target.c:188:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "f:Q:i:o:0:1:2:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/cut_target.c.pysam.c:190:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "f:Q:i:o:0:1:2:", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/dict.c:88:31: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *real_path = realpath(fn, NULL); data/python-pysam-0.15.4+ds/samtools/dict.c:134:16: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ( (c=getopt_long(argc,argv,"?hHa:s:u:o:",loptions,NULL))>0 ) data/python-pysam-0.15.4+ds/samtools/dict.c.pysam.c:90:31: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *real_path = realpath(fn, NULL); data/python-pysam-0.15.4+ds/samtools/dict.c.pysam.c:136:16: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ( (c=getopt_long(argc,argv,"?hHa:s:u:o:",loptions,NULL))>0 ) data/python-pysam-0.15.4+ds/samtools/faidx.c:258:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "ho:n:cr:fi", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c:260:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "ho:n:cr:fi", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c:76:17: [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. while ((c = getopt(argc, argv, "pc")) >= 0) { data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c.pysam.c:78:17: [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. while ((c = getopt(argc, argv, "pc")) >= 0) { data/python-pysam-0.15.4+ds/samtools/padding.c:446:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "SCso:u1T:?", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:448:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "SCso:u1T:?", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/phase.c:346:16: [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. is_flip = (drand48() < 0.5); data/python-pysam-0.15.4+ds/samtools/phase.c:369:34: [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. if (which == 3) which = (drand48() < 0.5); data/python-pysam-0.15.4+ds/samtools/phase.c:608:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Q:eFq:k:b:l:D:A", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:348:16: [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. is_flip = (drand48() < 0.5); data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:371:34: [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. if (which == 3) which = (drand48() < 0.5); data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:610:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Q:eFq:k:b:l:D:A", lopts, NULL)) >= 0) { data/python-pysam-0.15.4+ds/samtools/sam_view.c:312:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, data/python-pysam-0.15.4+ds/samtools/sam_view.c:320:17: [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(settings.subsam_seed); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:314:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:322:17: [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(settings.subsam_seed); data/python-pysam-0.15.4+ds/samtools/stats.c:2364:18: [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,"?hdsXxpr:c:l:i:t:m:q:f:F:g:I:S:P:@:",loptions,NULL))>0 ) data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:2366:18: [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,"?hdsXxpr:c:l:i:t:m:q:f:F:g:I:S:P:@:",loptions,NULL))>0 ) data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:347:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:349:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/merge/test_rtrans_build.c:72:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/merge/test_rtrans_build.c.pysam.c:74:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:315:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:317:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_count_rg.c:51:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_count_rg.c.pysam.c:53:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_expand_format_string.c:51:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_expand_format_string.c.pysam.c:53:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c:161:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c.pysam.c:163:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c:77:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c.pysam.c:79:27: [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. while ((getopt_char = getopt(argc, argv, "v")) != -1) { data/python-pysam-0.15.4+ds/win32/getopt.c:216:9: [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. #ifndef getenv data/python-pysam-0.15.4+ds/win32/getopt.c:217:14: [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. extern char *getenv (); data/python-pysam-0.15.4+ds/win32/getopt.c:402:21: [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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/python-pysam-0.15.4+ds/win32/getopt.c:1171:1: [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. getopt (argc, argv, optstring) data/python-pysam-0.15.4+ds/win32/getopt.c:1207:11: [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. c = getopt (argc, argv, "abc:d:0123456789"); data/python-pysam-0.15.4+ds/win32/getopt.h:151:12: [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. extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); data/python-pysam-0.15.4+ds/win32/getopt.h:153:12: [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. extern int getopt (); data/python-pysam-0.15.4+ds/win32/getopt.h:157:12: [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. extern int getopt_long (int ___argc, char *const *___argv, data/python-pysam-0.15.4+ds/win32/getopt.h:171:12: [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. extern int getopt (); data/python-pysam-0.15.4+ds/win32/getopt.h:173:12: [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. extern int getopt_long (); data/python-pysam-0.15.4+ds/win32/unistd.h:13:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom srand data/python-pysam-0.15.4+ds/win32/unistd.h:13:17: [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. #define srandom srand data/python-pysam-0.15.4+ds/win32/unistd.h:14:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random rand data/python-pysam-0.15.4+ds/bcftools/HMM.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(dst,out,sizeof(double)*n*n); data/python-pysam-0.15.4+ds/bcftools/HMM.c:114: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(hmm->init.vit_prob,probs,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:122: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(hmm->init.fwd_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); // these remain unchanged data/python-pysam-0.15.4+ds/bcftools/HMM.c:123: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(hmm->init.bwd_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:124: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(hmm->state.vit_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); // can be changed by snapshotting data/python-pysam-0.15.4+ds/bcftools/HMM.c:125: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(hmm->state.fwd_prob,hmm->init.fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:126: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(hmm->state.bwd_prob,hmm->init.bwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:170: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(hmm->state.vit_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:171: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(hmm->state.fwd_prob,hmm->init.fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:176: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(hmm->state.vit_prob,snapshot->vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.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(hmm->state.fwd_prob,snapshot->fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:185: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(hmm->state.vit_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:186: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(hmm->state.fwd_prob,hmm->init.fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:197: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(hmm->tprob_arr,tprob,sizeof(double)*hmm->nstates*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:217: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(hmm->curr_tprob, hmm->tprob_arr+n*hmm->nstates*hmm->nstates, sizeof(*hmm->curr_tprob)*hmm->nstates*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.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(hmm->vprob, hmm->state.vit_prob, sizeof(*hmm->state.vit_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:275: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(hmm->snapshot->vit_prob, hmm->vprob, sizeof(*hmm->vprob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:308: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(hmm->fwd, hmm->state.fwd_prob, sizeof(*hmm->state.fwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:309: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(hmm->bwd, hmm->state.bwd_prob, sizeof(*hmm->state.bwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:337: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(hmm->snapshot->fwd_prob, fwd, sizeof(*fwd)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:391: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(hmm->fwd, hmm->state.fwd_prob, sizeof(*hmm->state.fwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c:392: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(hmm->bwd, hmm->state.bwd_prob, sizeof(*hmm->state.bwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:92: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(dst,out,sizeof(double)*n*n); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:116: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(hmm->init.vit_prob,probs,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:124: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(hmm->init.fwd_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); // these remain unchanged data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:125: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(hmm->init.bwd_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:126: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(hmm->state.vit_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); // can be changed by snapshotting data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:127: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(hmm->state.fwd_prob,hmm->init.fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:128: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(hmm->state.bwd_prob,hmm->init.bwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:172: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(hmm->state.vit_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:173: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(hmm->state.fwd_prob,hmm->init.fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:178: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(hmm->state.vit_prob,snapshot->vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:179: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(hmm->state.fwd_prob,snapshot->fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:187: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(hmm->state.vit_prob,hmm->init.vit_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:188: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(hmm->state.fwd_prob,hmm->init.fwd_prob,sizeof(double)*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:199: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(hmm->tprob_arr,tprob,sizeof(double)*hmm->nstates*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:219: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(hmm->curr_tprob, hmm->tprob_arr+n*hmm->nstates*hmm->nstates, sizeof(*hmm->curr_tprob)*hmm->nstates*hmm->nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:245: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(hmm->vprob, hmm->state.vit_prob, sizeof(*hmm->state.vit_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:277: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(hmm->snapshot->vit_prob, hmm->vprob, sizeof(*hmm->vprob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:310: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(hmm->fwd, hmm->state.fwd_prob, sizeof(*hmm->state.fwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:311: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(hmm->bwd, hmm->state.bwd_prob, sizeof(*hmm->state.bwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:339: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(hmm->snapshot->fwd_prob, fwd, sizeof(*fwd)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:393: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(hmm->fwd, hmm->state.fwd_prob, sizeof(*hmm->state.fwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/HMM.c.pysam.c:394: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(hmm->bwd, hmm->state.bwd_prob, sizeof(*hmm->state.bwd_prob)*nstates); data/python-pysam-0.15.4+ds/bcftools/bam2bcf_indel.c:446: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(&bca->inscns[t * bca->maxins], &inscns[(sumq[t]&0x3f) * max_ins], bca->maxins); data/python-pysam-0.15.4+ds/bcftools/bam2bcf_indel.c.pysam.c:448: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(&bca->inscns[t * bca->maxins], &inscns[(sumq[t]&0x3f) * max_ins], bca->maxins); data/python-pysam-0.15.4+ds/bcftools/bcftools.h:58:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char iupac[4][4] = { {'A','M','R','W'},{'M','C','S','Y'},{'R','S','G','K'},{'W','Y','K','T'} }; data/python-pysam-0.15.4+ds/bcftools/bcftools.h:76:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char iupac_mask[90] = { data/python-pysam-0.15.4+ds/bcftools/ccall.c:185: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 tmp[4]; data/python-pysam-0.15.4+ds/bcftools/ccall.c.pysam.c:187: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 tmp[4]; data/python-pysam-0.15.4+ds/bcftools/cols.c:71: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(ptr, cols->off[i], len); data/python-pysam-0.15.4+ds/bcftools/cols.c:75: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(ptr, str, str_len); data/python-pysam-0.15.4+ds/bcftools/cols.c.pysam.c:73: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(ptr, cols->off[i], len); data/python-pysam-0.15.4+ds/bcftools/cols.c.pysam.c:77: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(ptr, str, str_len); data/python-pysam-0.15.4+ds/bcftools/consensus.c:234: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). args->fp_chain = fopen(args->chain_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/consensus.c:241:24: [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). args->fp_out = fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/consensus.c:536: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 alleles[4]; data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:236: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). args->fp_chain = fopen(args->chain_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:243:24: [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). args->fp_out = fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:538: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 alleles[4]; data/python-pysam-0.15.4+ds/bcftools/convert.c:587:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char iupac[4][4] = { {'A','M','R','W'},{'M','C','S','Y'},{'R','S','G','K'},{'W','Y','K','T'} }; data/python-pysam-0.15.4+ds/bcftools/convert.c:1290: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). int idx = atoi((*p)+1); data/python-pysam-0.15.4+ds/bcftools/convert.c.pysam.c:589:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char iupac[4][4] = { {'A','M','R','W'},{'M','C','S','Y'},{'R','S','G','K'},{'W','Y','K','T'} }; data/python-pysam-0.15.4+ds/bcftools/convert.c.pysam.c:1292: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). int idx = atoi((*p)+1); data/python-pysam-0.15.4+ds/bcftools/csq.c:949: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(gene->name,ss,se-ss); data/python-pysam-0.15.4+ds/bcftools/csq.c:1378:42: [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). args->out = args->output_fname ? fopen(args->output_fname,"w") : stdout; data/python-pysam-0.15.4+ds/bcftools/csq.c:2274: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(child->var,rec->d.allele[0],rlen); data/python-pysam-0.15.4+ds/bcftools/csq.c:2276: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(child->var+rlen+1,rec->d.allele[ial],alen); data/python-pysam-0.15.4+ds/bcftools/csq.c:2323: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[3], *codon, *end; data/python-pysam-0.15.4+ds/bcftools/csq.c:2517: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(tr->sref, tr->ref + tr->cds[0]->beg - tr->beg, N_REF_PAD); data/python-pysam-0.15.4+ds/bcftools/csq.c:2522: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(tr->sref + len, tr->ref + N_REF_PAD + tr->cds[i]->beg - tr->beg, tr->cds[i]->len); data/python-pysam-0.15.4+ds/bcftools/csq.c:2525: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(tr->sref + len, tr->ref + N_REF_PAD + tr->cds[tr->ncds-1]->beg - tr->beg, N_REF_PAD); data/python-pysam-0.15.4+ds/bcftools/csq.c:3284: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(ref+i, tr->ref, len); data/python-pysam-0.15.4+ds/bcftools/csq.c:4141:35: [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). args->verbosity = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/csq.c:4158:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). args->ncsq_max = 2 * atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:951: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(gene->name,ss,se-ss); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:1380:42: [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). args->out = args->output_fname ? fopen(args->output_fname,"w") : bcftools_stdout; data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2276: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(child->var,rec->d.allele[0],rlen); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2278: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(child->var+rlen+1,rec->d.allele[ial],alen); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2325: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[3], *codon, *end; data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2519: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(tr->sref, tr->ref + tr->cds[0]->beg - tr->beg, N_REF_PAD); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2524: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(tr->sref + len, tr->ref + N_REF_PAD + tr->cds[i]->beg - tr->beg, tr->cds[i]->len); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2527: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(tr->sref + len, tr->ref + N_REF_PAD + tr->cds[tr->ncds-1]->beg - tr->beg, N_REF_PAD); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:3286: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(ref+i, tr->ref, len); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:4143:35: [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). args->verbosity = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:4160:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). args->ncsq_max = 2 * atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/em.c:213:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for (i = 0; i < 3; ++i) memcpy(g[i], x + 1, 3 * sizeof(double)); data/python-pysam-0.15.4+ds/bcftools/em.c.pysam.c:215:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. for (i = 0; i < 3; ++i) memcpy(g[i], x + 1, 3 * sizeof(double)); data/python-pysam-0.15.4+ds/bcftools/filter.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(tok->str_value.s, line->d.info[i].vptr, n); data/python-pysam-0.15.4+ds/bcftools/filter.c:643:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, beg, end - beg); data/python-pysam-0.15.4+ds/bcftools/filter.c:1061: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(rtok->pass_samples, tok->pass_samples, rtok->nsamples*sizeof(*rtok->pass_samples)); data/python-pysam-0.15.4+ds/bcftools/filter.c:1067: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(rtok->usmpl, tok->usmpl, tok->nsamples*sizeof(*rtok->usmpl)); data/python-pysam-0.15.4+ds/bcftools/filter.c:1414: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(rtok->usmpl, tok->usmpl, tok->nsamples); data/python-pysam-0.15.4+ds/bcftools/filter.c:1523: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(rtok->pass_samples, tok->pass_samples, rtok->nsamples*sizeof(*rtok->pass_samples)); data/python-pysam-0.15.4+ds/bcftools/filter.c:1528: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(rtok->usmpl, tok->usmpl, tok->nsamples*sizeof(*rtok->usmpl)); data/python-pysam-0.15.4+ds/bcftools/filter.c:2206: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(tok->key,str+1,len-2); data/python-pysam-0.15.4+ds/bcftools/filter.c:2218: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(tok->tag,str,len); data/python-pysam-0.15.4+ds/bcftools/filter.c:2615: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(rmme, beg, end - beg); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:383: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(tok->str_value.s, line->d.info[i].vptr, n); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:645:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, beg, end - beg); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1063: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(rtok->pass_samples, tok->pass_samples, rtok->nsamples*sizeof(*rtok->pass_samples)); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1069: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(rtok->usmpl, tok->usmpl, tok->nsamples*sizeof(*rtok->usmpl)); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1416: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(rtok->usmpl, tok->usmpl, tok->nsamples); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1525: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(rtok->pass_samples, tok->pass_samples, rtok->nsamples*sizeof(*rtok->pass_samples)); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1530: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(rtok->usmpl, tok->usmpl, tok->nsamples*sizeof(*rtok->usmpl)); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2208: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(tok->key,str+1,len-2); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2220: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(tok->tag,str,len); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2617: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(rmme, beg, end - beg); data/python-pysam-0.15.4+ds/bcftools/gvcf.c:174: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(gvcf->dp,gvcf->tmp,nsmpl*sizeof(int32_t)); // tmp still contains DP from rec data/python-pysam-0.15.4+ds/bcftools/gvcf.c.pysam.c:176: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(gvcf->dp,gvcf->tmp,nsmpl*sizeof(int32_t)); // tmp still contains DP from rec data/python-pysam-0.15.4+ds/bcftools/kmin.c:80: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(x1, x, n * sizeof(double)); /* x1 = x */ data/python-pysam-0.15.4+ds/bcftools/kmin.c.pysam.c:82: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(x1, x, n * sizeof(double)); /* x1 = x */ data/python-pysam-0.15.4+ds/bcftools/mcall.c:1296:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)tmp_new+size*k, (char *)tmp_ori+size*j, size); data/python-pysam-0.15.4+ds/bcftools/mcall.c:1326:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr_dst+size*l, ptr_src+size*k, size); data/python-pysam-0.15.4+ds/bcftools/mcall.c:1479:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst,src,size1); data/python-pysam-0.15.4+ds/bcftools/mcall.c.pysam.c:1298:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)tmp_new+size*k, (char *)tmp_ori+size*j, size); data/python-pysam-0.15.4+ds/bcftools/mcall.c.pysam.c:1328:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr_dst+size*l, ptr_src+size*k, size); data/python-pysam-0.15.4+ds/bcftools/mcall.c.pysam.c:1481:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst,src,size1); data/python-pysam-0.15.4+ds/bcftools/mpileup.c:101: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 *ref[2]; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:725:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_PATH_LEN]; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:733:16: [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 *fh = fopen(file_list,"r"); data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1003: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). case 4 : mplp.openQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1017:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'd': mplp.max_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1057:37: [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). case 'C': mplp.capQ_thres = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1058: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). case 'q': mplp.min_mq = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1059:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': mplp.min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1069:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'e': mplp.extQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1070:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'h': mplp.tandemQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1073:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'm': mplp.min_support = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c:1074:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'L': mplp.max_indel_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.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 *ref[2]; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:727:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_PATH_LEN]; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:735:16: [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 *fh = fopen(file_list,"r"); data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1005: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). case 4 : mplp.openQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1019:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'd': mplp.max_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1059:37: [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). case 'C': mplp.capQ_thres = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1060: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). case 'q': mplp.min_mq = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1061:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': mplp.min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1071:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'e': mplp.extQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1072:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'h': mplp.tandemQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1075:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'm': mplp.min_support = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:1076:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'L': mplp.max_indel_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c:73: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 vs[17]; data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c:76: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 rsid[9]; data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c.pysam.c:75:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vs[17]; data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c.pysam.c:78: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 rsid[9]; data/python-pysam-0.15.4+ds/bcftools/plugins/color-chrs.c:467:20: [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). args->fp = fopen(str.s,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/color-chrs.c.pysam.c:469:20: [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). args->fp = fopen(str.s,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c:204: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). int val = atoi(&fa[0]); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c.pysam.c:206: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). int val = atoi(&fa[0]); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c:187:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(args->pop[args->npop-1].suffix+1,pop_name,strlen(pop_name)+1); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c:304: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(ftf->dst_tag, tag, expr-tag-1); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c:314: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(ftf->src_tag, expr, tmp-expr); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c.pysam.c:189:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(args->pop[args->npop-1].suffix+1,pop_name,strlen(pop_name)+1); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c.pysam.c:306: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(ftf->dst_tag, tag, expr-tag-1); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c.pysam.c:316: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(ftf->src_tag, expr, tmp-expr); data/python-pysam-0.15.4+ds/bcftools/plugins/indel-stats.c:332:82: [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 *fh = !args->output_fname || !strcmp("-",args->output_fname) ? stdout : fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/indel-stats.c.pysam.c:334:91: [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 *fh = !args->output_fname || !strcmp("-",args->output_fname) ? bcftools_stdout : fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c:371:50: [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). log_fh = strcmp("-",args.output_fname) ? fopen(args.output_fname,"w") : stdout; data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c.pysam.c:373:50: [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). log_fh = strcmp("-",args.output_fname) ? fopen(args.output_fname,"w") : bcftools_stdout; data/python-pysam-0.15.4+ds/bcftools/plugins/setGT.c:151: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(args->binom_tag,beg,end-beg); data/python-pysam-0.15.4+ds/bcftools/plugins/setGT.c.pysam.c:153: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(args->binom_tag,beg,end-beg); data/python-pysam-0.15.4+ds/bcftools/plugins/smpl-stats.c:217:82: [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 *fh = !args->output_fname || !strcmp("-",args->output_fname) ? stdout : fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/smpl-stats.c.pysam.c:219:91: [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 *fh = !args->output_fname || !strcmp("-",args->output_fname) ? bcftools_stdout : fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:324:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(args->column_str+olen,",",1); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:327: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(args->column_str+olen,ptr+1,nlen); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:417:24: [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 ( len ) memcpy(ann->tag,args->annot_prefix,len); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:418: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(ann->tag+len,ann->field,clen); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:326:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(args->column_str+olen,",",1); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:329:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(args->column_str+olen,ptr+1,nlen); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:419:24: [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 ( len ) memcpy(ann->tag,args->annot_prefix,len); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:420: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(ann->tag+len,ann->field,clen); data/python-pysam-0.15.4+ds/bcftools/plugins/split.c:303: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(out->shared.s,rec->shared.s,out->shared.l); data/python-pysam-0.15.4+ds/bcftools/plugins/split.c.pysam.c:305: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(out->shared.s,rec->shared.s,out->shared.l); data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c:319:86: [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). args->fp_out = !args->output_fname || !strcmp("-",args->output_fname) ? stdout : fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c:725:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'a': args->max_alt_trios = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c.pysam.c:321:95: [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). args->fp_out = !args->output_fname || !strcmp("-",args->output_fname) ? bcftools_stdout : fopen(args->output_fname,"w"); data/python-pysam-0.15.4+ds/bcftools/plugins/trio-stats.c.pysam.c:727:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'a': args->max_alt_trios = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:72: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[1024]; data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:73: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 dir[1024] = "./"; data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:80:15: [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). fp_vkrs = fopen(path, "w"); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:87:15: [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). fp_rsvk = fopen(path, "w"); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:94:15: [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). fp_nrvk = fopen(path, "w"); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.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[1024]; data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:75:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dir[1024] = "./"; data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:82:15: [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). fp_vkrs = fopen(path, "w"); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:89:15: [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). fp_rsvk = fopen(path, "w"); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:96:15: [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). fp_nrvk = fopen(path, "w"); data/python-pysam-0.15.4+ds/bcftools/prob1.c:96: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(ma->ploidy, ploidy, n_smpl); data/python-pysam-0.15.4+ds/bcftools/prob1.c:257:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ma->z1, z[1], sizeof(double) * (ma->n1 * 2 + 1)); data/python-pysam-0.15.4+ds/bcftools/prob1.c:306:24: [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 (z[0] != ma->z) memcpy(ma->z, z[0], sizeof(double) * (ma->M + 1)); data/python-pysam-0.15.4+ds/bcftools/prob1.c:321: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(ma->z2, ma->z, sizeof(double) * (2 * (ma->n - ma->n1) + 1)); data/python-pysam-0.15.4+ds/bcftools/prob1.c.pysam.c:98: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(ma->ploidy, ploidy, n_smpl); data/python-pysam-0.15.4+ds/bcftools/prob1.c.pysam.c:259:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ma->z1, z[1], sizeof(double) * (ma->n1 * 2 + 1)); data/python-pysam-0.15.4+ds/bcftools/prob1.c.pysam.c:308:24: [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 (z[0] != ma->z) memcpy(ma->z, z[0], sizeof(double) * (ma->M + 1)); data/python-pysam-0.15.4+ds/bcftools/prob1.c.pysam.c:323: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(ma->z2, ma->z, sizeof(double) * (2 * (ma->n - ma->n1) + 1)); data/python-pysam-0.15.4+ds/bcftools/rbuf.h:219: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(ptr+(rbuf)->m,ptr,sizeof(type_t)*(rbuf)->f); \ data/python-pysam-0.15.4+ds/bcftools/regidx.c:174: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((char *)list->dat + idx->payload_size*(list->nreg-1), payload, idx->payload_size); data/python-pysam-0.15.4+ds/bcftools/regidx.c:319:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)tmp_dat+i*regidx->payload_size, data/python-pysam-0.15.4+ds/bcftools/regidx.c.pysam.c:176: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((char *)list->dat + idx->payload_size*(list->nreg-1), payload, idx->payload_size); data/python-pysam-0.15.4+ds/bcftools/regidx.c.pysam.c:321:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)tmp_dat+i*regidx->payload_size, data/python-pysam-0.15.4+ds/bcftools/reheader.c:151: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_path[MAX_PATH]; data/python-pysam-0.15.4+ds/bcftools/reheader.c:157: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(tmp_path, "/bcftools-fai-header-XXXXXX"); data/python-pysam-0.15.4+ds/bcftools/reheader.c:162:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp(args->rm_tmpfile); data/python-pysam-0.15.4+ds/bcftools/reheader.c:461:36: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int out = args->output_fname ? open(args->output_fname, O_WRONLY|O_CREAT|O_TRUNC, 0666) : STDOUT_FILENO; data/python-pysam-0.15.4+ds/bcftools/reheader.c:506: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). j = atoi(src_hrec->vals[j]); data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c:153: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_path[MAX_PATH]; data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.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(tmp_path, "/bcftools-fai-header-XXXXXX"); data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c:164:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp(args->rm_tmpfile); data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c:463:36: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int out = args->output_fname ? open(args->output_fname, O_WRONLY|O_CREAT|O_TRUNC, 0666) : STDOUT_FILENO; data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c:508: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). j = atoi(src_hrec->vals[j]); data/python-pysam-0.15.4+ds/bcftools/tabix.c:42: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). else if (c == 'm') min_shift = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c:43:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 's') conf.sc = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c:44:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 'b') conf.bc = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c:45:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 'e') conf.ec = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c:47:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 'S') conf.line_skip = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c:99:23: [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(fn, "rb")) != 0) { data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:44: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). else if (c == 'm') min_shift = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:45:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 's') conf.sc = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:46:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 'b') conf.bc = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:47:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 'e') conf.ec = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:49:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else if (c == 'S') conf.line_skip = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:101:23: [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(fn, "rb")) != 0) { data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:88: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(*dat,ss,se-ss+1); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:298: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[250], *chr = "1"; data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c:412:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': seed = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:90: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(*dat,ss,se-ss+1); data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:300: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[250], *chr = "1"; data/python-pysam-0.15.4+ds/bcftools/test/test-regidx.c.pysam.c:414:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': seed = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/variantkey.h:148:16: [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. return sprintf(chrom, "NA"); data/python-pysam-0.15.4+ds/bcftools/variantkey.h:331:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char base[4] = {'A', 'C', 'G', 'T'}; data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c:981: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(args->tmps,col->mm_kstr.s,col->mm_kstr.l+1); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c:997: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(args->tmps,tab->cols[col->icol],len+1); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c.pysam.c:983: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(args->tmps,col->mm_kstr.s,col->mm_kstr.l+1); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c.pysam.c:999: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(args->tmps,tab->cols[col->icol],len+1); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c:121: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(lines[*nlines],name,len); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c:211: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 *col_ends[5], *tmp = str.s; data/python-pysam-0.15.4+ds/bcftools/vcfcall.c:394: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(als->allele[als->n-1],ss,se-ss); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c.pysam.c:123: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(lines[*nlines],name,len); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c.pysam.c:213: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 *col_ends[5], *tmp = str.s; data/python-pysam-0.15.4+ds/bcftools/vcfcall.c.pysam.c:396: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(als->allele[als->n-1],ss,se-ss); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:126:16: [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 *fp = fopen(str,mode); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:407:30: [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). args->fh_sites = fopen(args->output_fname, "w"); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:128:16: [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 *fp = fopen(str,mode); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:409:30: [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). args->fh_sites = fopen(args->output_fname, "w"); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:642: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(b[i]+l,a[0]+rlb,rla-rlb+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:655:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ai,a[i],l); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:656: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(ai+l,b[0]+rla,rlb-rla+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:990: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(info->vptr - info->vptr_off, tmp_str->s, tmp_str->l); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:1049:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->s+start_dst, src+start_src, nsrc_cpy); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:1263:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out->d.info[out->n_info].vptr,inf->vptr-inf->vptr_off, inf->vptr_len+inf->vptr_off); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:1538: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(tgt, ma->str[i].s, ma->str[i].l); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:2509: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[24]; snprintf(buf,sizeof buf,"%d",i+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:644: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(b[i]+l,a[0]+rlb,rla-rlb+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:657: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(ai,a[i],l); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:658: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(ai+l,b[0]+rla,rlb-rla+1); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:992: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(info->vptr - info->vptr_off, tmp_str->s, tmp_str->l); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:1051:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->s+start_dst, src+start_src, nsrc_cpy); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:1265:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out->d.info[out->n_info].vptr,inf->vptr-inf->vptr_off, inf->vptr_len+inf->vptr_off); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:1540: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(tgt, ma->str[i].s, ma->str[i].l); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:2511: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[24]; snprintf(buf,sizeof buf,"%d",i+1); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:396:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(als[i].s,ref,npad); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:398:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(als[i].s,ref,npad); data/python-pysam-0.15.4+ds/bcftools/vcfquery.c:338:32: [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). args->out = args->fn_out ? fopen(args->fn_out, "w") : stdout; data/python-pysam-0.15.4+ds/bcftools/vcfquery.c.pysam.c:340:32: [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). args->out = args->fn_out ? fopen(args->fn_out, "w") : bcftools_stdout; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:141: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). args->dclass = atoi(line); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:183: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[5]; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:504: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(args->train_dat+(ntrain-1)*args->mvals, args->vals, args->mvals*sizeof(double)); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:547: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(args->vals, args->train_dat+i*args->mvals, args->mvals*sizeof(double)); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:685:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': args->ntrain = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:686:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'r': args->rand_seed = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:689:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': args->nbin = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:690:37: [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). case 'f': args->nfold = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c:692:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). args->ndim = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:143: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). args->dclass = atoi(line); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:185:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[5]; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:506: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(args->train_dat+(ntrain-1)*args->mvals, args->vals, args->mvals*sizeof(double)); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:549: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(args->vals, args->train_dat+i*args->mvals, args->mvals*sizeof(double)); data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:687:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': args->ntrain = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:688:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'r': args->rand_seed = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:691:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': args->nbin = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:692:37: [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). case 'f': args->nfold = atoi(optarg); break; data/python-pysam-0.15.4+ds/bcftools/vcfsom.c.pysam.c:694:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). args->ndim = atoi(optarg); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:278: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_path[MAX_PATH]; data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:284: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(tmp_path, "/bcftools-sort.XXXXXX"); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:280: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_path[MAX_PATH]; data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:286: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(tmp_path, "/bcftools-sort.XXXXXX"); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c:359: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(usr->tag,str,tmp-str); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c:387: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(stats->usr,args->usr,args->nusr*sizeof(user_stats_t)); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c:361: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(usr->tag,str,tmp-str); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c:389: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(stats->usr,args->usr,args->nusr*sizeof(user_stats_t)); data/python-pysam-0.15.4+ds/bcftools/vcfview.c:224: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 modew[8]; data/python-pysam-0.15.4+ds/bcftools/vcfview.c:226:49: [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. if (args->clevel >= 0 && args->clevel <= 9) sprintf(modew + 1, "%d", args->clevel); data/python-pysam-0.15.4+ds/bcftools/vcfview.c:227:36: [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 (args->output_type==FT_BCF) strcat(modew, "bu"); // uncompressed BCF data/python-pysam-0.15.4+ds/bcftools/vcfview.c:596: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 allele_type[9] = "nref"; data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:226: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 modew[8]; data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:228:49: [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. if (args->clevel >= 0 && args->clevel <= 9) sprintf(modew + 1, "%d", args->clevel); data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:229:36: [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 (args->output_type==FT_BCF) strcat(modew, "bu"); // uncompressed BCF data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:598: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 allele_type[9] = "nref"; data/python-pysam-0.15.4+ds/pysam/htslib_util.c:102: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. const char tag[2], data/python-pysam-0.15.4+ds/pysam/htslib_util.c:139: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(b->data + ori_len + 8, data, l_data); data/python-pysam-0.15.4+ds/samtools/bam.c:91: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 LB_text[1024]; data/python-pysam-0.15.4+ds/samtools/bam.c:94: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(LB_text, lib.s, len); data/python-pysam-0.15.4+ds/samtools/bam.c:201: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(cigar, new_cigar, l * 4); // set CIGAR data/python-pysam-0.15.4+ds/samtools/bam.c.pysam.c:93: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 LB_text[1024]; data/python-pysam-0.15.4+ds/samtools/bam.c.pysam.c:96: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(LB_text, lib.s, len); data/python-pysam-0.15.4+ds/samtools/bam.c.pysam.c: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(cigar, new_cigar, l * 4); // set CIGAR data/python-pysam-0.15.4+ds/samtools/bam.h:513:62: [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 inline uint8_t *bam_aux_get_core(bam1_t *b, const char tag[2]) { return bam_aux_get(b, tag); } // an alias of bam_aux_get() data/python-pysam-0.15.4+ds/samtools/bam2bcf_indel.c:519: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(&bca->inscns[t * bca->maxins], &inscns[(sumq[t]&0x3f) * max_ins], bca->maxins); data/python-pysam-0.15.4+ds/samtools/bam2bcf_indel.c.pysam.c:521: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(&bca->inscns[t * bca->maxins], &inscns[(sumq[t]&0x3f) * max_ins], bca->maxins); data/python-pysam-0.15.4+ds/samtools/bam2depth.c:134: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). case 'l': min_len = atoi(optarg); break; // minimum query length data/python-pysam-0.15.4+ds/samtools/bam2depth.c:144:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': baseQ = atoi(optarg); break; // base quality threshold data/python-pysam-0.15.4+ds/samtools/bam2depth.c:145:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': mapQ = atoi(optarg); break; // mapping quality threshold data/python-pysam-0.15.4+ds/samtools/bam2depth.c:148:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'd': case 'm': max_depth = atoi(optarg); break; // maximum coverage depth data/python-pysam-0.15.4+ds/samtools/bam2depth.c:177:20: [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_out = fopen( output_file, "w" ); data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:136: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). case 'l': min_len = atoi(optarg); break; // minimum query length data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:146:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': baseQ = atoi(optarg); break; // base quality threshold data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:147:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': mapQ = atoi(optarg); break; // mapping quality threshold data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:150:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'd': case 'm': max_depth = atoi(optarg); break; // maximum coverage depth data/python-pysam-0.15.4+ds/samtools/bam2depth.c.pysam.c:179:20: [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_out = fopen( output_file, "w" ); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:146: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(ns, s, len); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:317: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 output_mode[8] = "w"; data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:148: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(ns, s, len); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:319: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 output_mode[8] = "w"; data/python-pysam-0.15.4+ds/samtools/bam_cat.c:211: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 vers[100]; data/python-pysam-0.15.4+ds/samtools/bam_cat.c:212: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(vers, "%d.%d", vers_maj, vers_min); data/python-pysam-0.15.4+ds/samtools/bam_cat.c:419:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf,ebuf+len,diff); data/python-pysam-0.15.4+ds/samtools/bam_cat.c:420:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf+diff,buf,len); data/python-pysam-0.15.4+ds/samtools/bam_cat.c:426:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf,buf+len,es); data/python-pysam-0.15.4+ds/samtools/bam_cat.c:511: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(infns+infns_size, fns_read, nfns * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_cat.c:538: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(infns + infns_size, argv + optind, nargv_fns * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:213: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 vers[100]; data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:214: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(vers, "%d.%d", vers_maj, vers_min); data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:421:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf,ebuf+len,diff); data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:422:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf+diff,buf,len); data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:428:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf,buf+len,es); data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:513: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(infns+infns_size, fns_read, nfns * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_cat.c.pysam.c:540: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(infns + infns_size, argv + optind, nargv_fns * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:130: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 *fnr[3]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:139: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 *index_file[2]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:594:49: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'c': opts->compression_level = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:596: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). case 'v': opts->def_qual = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:685: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 mode[4] = "w"; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:132:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *fnr[3]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:141: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 *index_file[2]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:596:49: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'c': opts->compression_level = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:598: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). case 'v': opts->def_qual = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:687: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 mode[4] = "w"; data/python-pysam-0.15.4+ds/samtools/bam_index.c:66: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). case 'm': csi = 1; min_shift = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_index.c:67:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '@': n_threads = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_index.c.pysam.c:68: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). case 'm': csi = 1; min_shift = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_index.c.pysam.c:69:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '@': n_threads = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_lpileup.c:173: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(tv->pre_level, tv->cur_level, tv->n_cur * 4); data/python-pysam-0.15.4+ds/samtools/bam_lpileup.c.pysam.c:175: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(tv->pre_level, tv->cur_level, tv->n_cur * 4); data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:106:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sig[13]; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:108: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(sig + i, &key.this_ref, 4); i += 4; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:109: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(sig + i, &key.this_coord, 8); i += 8; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:110: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(sig + i, &key.orientation, 1); i += 1; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:114:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sig[26]; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:116: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(sig + i, &key.this_ref, 4); i += 4; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:117: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(sig + i, &key.this_coord, 8); i += 8; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:118: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(sig + i, &key.other_ref, 4); i += 4; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:119: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(sig + i, &key.other_coord, 8); i += 8; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:120: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(sig + i, &key.leftmost, 1); i += 1; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:121: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(sig + i, &key.orientation, 1); i += 1; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:1662:31: [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 (NULL == (fp = fopen(param->stats_file, "w"))) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:1764: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 wmode[3] = {'w', 'b', 0}; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:1783:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': param.max_length = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:1789: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). case 'd': param.opt_dist = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:108:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sig[13]; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:110: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(sig + i, &key.this_ref, 4); i += 4; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:111: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(sig + i, &key.this_coord, 8); i += 8; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:112: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(sig + i, &key.orientation, 1); i += 1; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:116:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sig[26]; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:118: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(sig + i, &key.this_ref, 4); i += 4; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:119: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(sig + i, &key.this_coord, 8); i += 8; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:120: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(sig + i, &key.other_ref, 4); i += 4; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:121: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(sig + i, &key.other_coord, 8); i += 8; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:122: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(sig + i, &key.leftmost, 1); i += 1; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:123: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(sig + i, &key.orientation, 1); i += 1; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:1664:31: [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 (NULL == (fp = fopen(param->stats_file, "w"))) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:1766: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 wmode[3] = {'w', 'b', 0}; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:1785:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': param.max_length = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:1791: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). case 'd': param.opt_dist = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_mate.c:430: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 wmode[3] = {'w', 'b', 0}; data/python-pysam-0.15.4+ds/samtools/bam_mate.c.pysam.c:432: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 wmode[3] = {'w', 'b', 0}; data/python-pysam-0.15.4+ds/samtools/bam_md.c:219:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': max_nm = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_md.c:220:26: [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). case 'C': capQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:221:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': max_nm = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:222:26: [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). case 'C': capQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:54: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[16]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:163: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 *ref[2]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:649:41: [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). pileup_fp = conf->output_fname? fopen(conf->output_fname, "w") : stdout; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:998:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_PATH_LEN]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1006:16: [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 *fh = fopen(file_list,"r"); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1245: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). case 4 : mplp.openQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1261:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'd': mplp.max_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1286:37: [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). case 'C': mplp.capQ_thres = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1287: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). case 'q': mplp.min_mq = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1288:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': mplp.min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1304:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'e': mplp.extQ = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1305:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'h': mplp.tandemQ = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1308:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'm': mplp.min_support = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1309:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'L': mplp.max_indel_depth = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1312: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 buf[1024]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1314:30: [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_rg = fopen(optarg, "r")) == NULL) data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:56: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[16]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.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 *ref[2]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:651:41: [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). pileup_fp = conf->output_fname? fopen(conf->output_fname, "w") : samtools_stdout; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1000:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_PATH_LEN]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1008:16: [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 *fh = fopen(file_list,"r"); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1247: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). case 4 : mplp.openQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1263:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'd': mplp.max_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1288:37: [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). case 'C': mplp.capQ_thres = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1289: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). case 'q': mplp.min_mq = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1290:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': mplp.min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1306:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'e': mplp.extQ = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1307:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'h': mplp.tandemQ = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1310:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'm': mplp.min_support = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1311:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'L': mplp.max_indel_depth = atoi(optarg); deprecated(c); break; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1314: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 buf[1024]; data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1316:30: [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_rg = fopen(optarg, "r")) == NULL) data/python-pysam-0.15.4+ds/samtools/bam_reheader.c:457:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int tmp_fd = mkstemp(tmp_fn); data/python-pysam-0.15.4+ds/samtools/bam_reheader.c.pysam.c:459:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int tmp_fd = mkstemp(tmp_fn); data/python-pysam-0.15.4+ds/samtools/bam_rmdup.c:273: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 wmode[3] = {'w', 'b', 0}; data/python-pysam-0.15.4+ds/samtools/bam_rmdup.c.pysam.c:275: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 wmode[3] = {'w', 'b', 0}; data/python-pysam-0.15.4+ds/samtools/bam_sort.c:83: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(target_iter, pattern, 4); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:87: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(target_iter, pattern, size%4); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:100:8: [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 g_sort_tag[2] = {0,0}; data/python-pysam-0.15.4+ds/samtools/bam_sort.c:524:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_hdr_line.s + id_offset, transformed_id.s, data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1321: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 mode[12]; data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1322:5: [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(mode, "wb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1385:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': level = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1388:33: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': random_seed = atol(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1402:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fn+fn_size, fn_read, nfiles * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1431:20: [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 *fp = fopen(argv[optind], "rb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1454: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(fn+fn_size, argv + (optind+1), nargcfiles * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1459: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(fn_idx+fn_size, argv + nargcfiles + (optind+1), nargcfiles * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1468:5: [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(mode, "wb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1470:21: [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. if (level >= 0) sprintf(strchr(mode, '\0'), "%d", level < 9? level : 9); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2162:52: [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. buf[k].bam_record->data = (uint8_t *)((char *)buf[k].bam_record + sizeof(bam1_t)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2163: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(buf[k].bam_record->data, b->data, b->l_data); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2332:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': level = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2373:5: [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(modeout, "wb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2375:21: [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. if (level >= 0) sprintf(strchr(modeout, '\0'), "%d", level < 9? level : 9); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2393: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 dummy[4]; data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.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(target_iter, pattern, 4); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:89: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(target_iter, pattern, size%4); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:102:8: [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 g_sort_tag[2] = {0,0}; data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:526:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_hdr_line.s + id_offset, transformed_id.s, data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1323: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 mode[12]; data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1324:5: [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(mode, "wb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1387:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': level = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1390:33: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': random_seed = atol(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1404:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fn+fn_size, fn_read, nfiles * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1433:20: [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 *fp = fopen(argv[optind], "rb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1456: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(fn+fn_size, argv + (optind+1), nargcfiles * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1461: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(fn_idx+fn_size, argv + nargcfiles + (optind+1), nargcfiles * sizeof(char*)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1470:5: [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(mode, "wb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1472:21: [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. if (level >= 0) sprintf(strchr(mode, '\0'), "%d", level < 9? level : 9); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2164:52: [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. buf[k].bam_record->data = (uint8_t *)((char *)buf[k].bam_record + sizeof(bam1_t)); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2165: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(buf[k].bam_record->data, b->data, b->l_data); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2334:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': level = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2375:5: [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(modeout, "wb"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2377:21: [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. if (level >= 0) sprintf(strchr(modeout, '\0'), "%d", level < 9? level : 9); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2395: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 dummy[4]; data/python-pysam-0.15.4+ds/samtools/bam_stat.c:91:21: [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. if (total != 0) sprintf(buffer, "%.2f%%", (float)n / total * 100.0); data/python-pysam-0.15.4+ds/samtools/bam_stat.c:92:10: [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. else strcpy(buffer, "N/A"); data/python-pysam-0.15.4+ds/samtools/bam_stat.c:98:21: [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. if (total != 0) sprintf(buffer, "%.2f", (float)n / total * 100.0); data/python-pysam-0.15.4+ds/samtools/bam_stat.c:99:10: [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. else strcpy(buffer, "null"); data/python-pysam-0.15.4+ds/samtools/bam_stat.c:115: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 b0[16], b1[16]; data/python-pysam-0.15.4+ds/samtools/bam_stat.c:132:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b0[16], b1[16]; data/python-pysam-0.15.4+ds/samtools/bam_stat.c:206: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 b0[16], b1[16]; data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c:93:21: [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. if (total != 0) sprintf(buffer, "%.2f%%", (float)n / total * 100.0); data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c:94:10: [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. else strcpy(buffer, "N/A"); data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c:100:21: [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. if (total != 0) sprintf(buffer, "%.2f", (float)n / total * 100.0); data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c:101:10: [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. else strcpy(buffer, "null"); data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.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 b0[16], b1[16]; data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c:134: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 b0[16], b1[16]; data/python-pysam-0.15.4+ds/samtools/bam_stat.c.pysam.c:208: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 b0[16], b1[16]; data/python-pysam-0.15.4+ds/samtools/bamshuf.c:227: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(modew, "wb%d", (clevel >= 0 && clevel <= 9)? clevel : DEF_CLEVEL); data/python-pysam-0.15.4+ds/samtools/bamshuf.c:595:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': n_files = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bamshuf.c:596:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': clevel = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bamshuf.c:601: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). case 'r': reads_store = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:229: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(modew, "wb%d", (clevel >= 0 && clevel <= 9)? clevel : DEF_CLEVEL); data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:597:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': n_files = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:598:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': clevel = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:603: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). case 'r': reads_store = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bedcov.c:85:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': min_mapQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bedcov.c:167: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). *p = 0; beg = atoi(q); *p = '\t'; data/python-pysam-0.15.4+ds/samtools/bedcov.c:171:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *p = 0; end = atoi(q); *p = c; data/python-pysam-0.15.4+ds/samtools/bedcov.c.pysam.c:87:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': min_mapQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/bedcov.c.pysam.c:169: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). *p = 0; beg = atoi(q); *p = '\t'; data/python-pysam-0.15.4+ds/samtools/bedcov.c.pysam.c:173:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *p = 0; end = atoi(q); *p = c; data/python-pysam-0.15.4+ds/samtools/bedidx.c:491: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 reg[1024]; data/python-pysam-0.15.4+ds/samtools/bedidx.c.pysam.c:493: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 reg[1024]; data/python-pysam-0.15.4+ds/samtools/coverage.c:92: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 *const BLOCK_CHARS8[8] = {"\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"}; data/python-pysam-0.15.4+ds/samtools/coverage.c:94: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 *const BLOCK_CHARS2[2] = {"\u2584", "\u2588"}; data/python-pysam-0.15.4+ds/samtools/coverage.c:101: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 *const BLOCK_CHARS8[8] = { data/python-pysam-0.15.4+ds/samtools/coverage.c:105: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 *const BLOCK_CHARS2[2] = {"\xE2\x96\x84", "\xE2\x96\x88"}; data/python-pysam-0.15.4+ds/samtools/coverage.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 buf[30]; data/python-pysam-0.15.4+ds/samtools/coverage.c:292: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[50]; data/python-pysam-0.15.4+ds/samtools/coverage.c:375:37: [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). case 'L': opt_min_len = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/coverage.c:376:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': opt_min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/coverage.c:377:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': opt_min_mapQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/coverage.c:378:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'w': opt_n_bins = atoi(optarg); opt_full_width = false; data/python-pysam-0.15.4+ds/samtools/coverage.c:413:20: [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_out = fopen( opt_output_file, "w" ); data/python-pysam-0.15.4+ds/samtools/coverage.c:436: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). columns = atoi(env_columns); // atoi(NULL) returns 0 data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:94: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 *const BLOCK_CHARS8[8] = {"\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"}; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:96: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 *const BLOCK_CHARS2[2] = {"\u2584", "\u2588"}; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:103: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 *const BLOCK_CHARS8[8] = { data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:107: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 *const BLOCK_CHARS2[2] = {"\xE2\x96\x84", "\xE2\x96\x88"}; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:247: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[30]; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:294: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[50]; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:377:37: [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). case 'L': opt_min_len = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:378:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': opt_min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:379:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'Q': opt_min_mapQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:380:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'w': opt_n_bins = atoi(optarg); opt_full_width = false; data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:415:20: [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_out = fopen( opt_output_file, "w" ); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:438: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). columns = atoi(env_columns); // atoi(NULL) returns 0 data/python-pysam-0.15.4+ds/samtools/cut_target.c:190:37: [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). case 'Q': g.min_baseQ = atoi(optarg); break; // quality cutoff data/python-pysam-0.15.4+ds/samtools/cut_target.c:191:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'i': g_param.p[0][1] = -atoi(optarg); break; // 0->1 transition (in) PENALTY data/python-pysam-0.15.4+ds/samtools/cut_target.c:192:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '0': g_param.e[1][0] = atoi(optarg); break; // emission SCORE data/python-pysam-0.15.4+ds/samtools/cut_target.c:193:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '1': g_param.e[1][1] = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/cut_target.c:194:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '2': g_param.e[1][2] = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/cut_target.c.pysam.c:192:37: [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). case 'Q': g.min_baseQ = atoi(optarg); break; // quality cutoff data/python-pysam-0.15.4+ds/samtools/cut_target.c.pysam.c:193:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'i': g_param.p[0][1] = -atoi(optarg); break; // 0->1 transition (in) PENALTY data/python-pysam-0.15.4+ds/samtools/cut_target.c.pysam.c:194:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '0': g_param.e[1][0] = atoi(optarg); break; // emission SCORE data/python-pysam-0.15.4+ds/samtools/cut_target.c.pysam.c:195:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '1': g_param.e[1][1] = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/cut_target.c.pysam.c:196:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case '2': g_param.e[1][2] = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/dict.c:50: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. unsigned char digest[16]; data/python-pysam-0.15.4+ds/samtools/dict.c:51: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 hex[33]; data/python-pysam-0.15.4+ds/samtools/dict.c:60:15: [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). out = fopen(args->output_fname, "w"); data/python-pysam-0.15.4+ds/samtools/dict.c.pysam.c:52: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. unsigned char digest[16]; data/python-pysam-0.15.4+ds/samtools/dict.c.pysam.c:53: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 hex[33]; data/python-pysam-0.15.4+ds/samtools/dict.c.pysam.c:62:15: [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). out = fopen(args->output_fname, "w"); data/python-pysam-0.15.4+ds/samtools/faidx.c:51: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. static unsigned char comp_base[256] = { data/python-pysam-0.15.4+ds/samtools/faidx.c:261:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': line_len = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/faidx.c:292: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(pos_strand_name, optarg + 7, comma); data/python-pysam-0.15.4+ds/samtools/faidx.c:295:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(neg_strand_name, optarg + 7 + comma + 1, data/python-pysam-0.15.4+ds/samtools/faidx.c:333:20: [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_out = fopen( output_file, "w" ); data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c:53: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. static unsigned char comp_base[256] = { data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c:263:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'n': line_len = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c:294: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(pos_strand_name, optarg + 7, comma); data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c:297:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(neg_strand_name, optarg + 7 + comma + 1, data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c:335:20: [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_out = fopen( output_file, "w" ); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:218: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(memPtr, &value, sizeof(value)); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:223: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(memPtr, &value, sizeof(value)); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:252:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst,src,8); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:668: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(op, anchor, lastRun); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:885: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(op, anchor, lastRunSize); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:1176: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(op, ip, length); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:1215:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op, dictEnd - copySize, copySize); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:1222: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(op, lowPrefix, restSize); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c:1237: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(op+4, match, 4); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:220: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(memPtr, &value, sizeof(value)); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:225: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(memPtr, &value, sizeof(value)); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:254:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst,src,8); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:670: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(op, anchor, lastRun); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:887: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(op, anchor, lastRunSize); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:1178: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(op, ip, length); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:1217:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(op, dictEnd - copySize, copySize); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:1224: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(op, lowPrefix, restSize); data/python-pysam-0.15.4+ds/samtools/lz4/lz4.c.pysam.c:1239: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(op+4, match, 4); data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c:158: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). q = atoi(s.s) + 33; data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c:178:50: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ks_getuntil(ks, 0, &s, &dret); pos = atoi(s.s); neg = pos < 0? 1 : 0; pos = pos < 0? -pos : pos; // position data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c:194:50: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ks_getuntil(ks, 0, &s, &dret); beg = atoi(s.s) - 1; // align clipping start data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c:195:50: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ks_getuntil(ks, 0, &s, &dret); end = atoi(s.s); // clipping end data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c.pysam.c:160: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). q = atoi(s.s) + 33; data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c.pysam.c:180:50: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ks_getuntil(ks, 0, &s, &dret); pos = atoi(s.s); neg = pos < 0? 1 : 0; pos = pos < 0? -pos : pos; // position data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c.pysam.c:196:50: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ks_getuntil(ks, 0, &s, &dret); beg = atoi(s.s) - 1; // align clipping start data/python-pysam-0.15.4+ds/samtools/misc/ace2sam.c.pysam.c:197:50: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ks_getuntil(ks, 0, &s, &dret); end = atoi(s.s); // clipping end data/python-pysam-0.15.4+ds/samtools/padding.c:55: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(b->data + b->core.l_qname, cigar, n * 4); data/python-pysam-0.15.4+ds/samtools/padding.c:58:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. } else memcpy(b->data + b->core.l_qname, cigar, n * 4); data/python-pysam-0.15.4+ds/samtools/padding.c:395: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 len_buf[64]; data/python-pysam-0.15.4+ds/samtools/padding.c:407: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(len_buf, "%"PRIhts_pos"", unpadded_len); data/python-pysam-0.15.4+ds/samtools/padding.c:433: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 in_mode[5], out_mode[6], *fn_out = 0, *fn_list = 0, *fn_out_idx = NULL; data/python-pysam-0.15.4+ds/samtools/padding.c:473: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[2]; data/python-pysam-0.15.4+ds/samtools/padding.c:509: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 wmode[2]; data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:57: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(b->data + b->core.l_qname, cigar, n * 4); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:60:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. } else memcpy(b->data + b->core.l_qname, cigar, n * 4); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:397: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 len_buf[64]; data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:409: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(len_buf, "%"PRIhts_pos"", unpadded_len); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:435: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 in_mode[5], out_mode[6], *fn_out = 0, *fn_list = 0, *fn_out_idx = NULL; data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:475: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[2]; data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:511: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 wmode[2]; data/python-pysam-0.15.4+ds/samtools/phase.c:61: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 *out_name[3]; data/python-pysam-0.15.4+ds/samtools/phase.c:528:51: [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). uint64_t x = (uint64_t)tid<<32 | (atoi(str->s) - 1); data/python-pysam-0.15.4+ds/samtools/phase.c:610:37: [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). case 'D': g.max_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/phase.c:611:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': g.min_varLOD = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/phase.c:612:37: [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). case 'Q': g.min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/phase.c:613:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'k': g.k = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:63: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 *out_name[3]; data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:530:51: [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). uint64_t x = (uint64_t)tid<<32 | (atoi(str->s) - 1); data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:612:37: [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). case 'D': g.max_depth = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:613:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': g.min_varLOD = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:614:37: [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). case 'Q': g.min_baseQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/phase.c.pysam.c:615:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'k': g.k = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/sam.c:134: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(strcpy(fn_list, fn_ref), ".fai"); data/python-pysam-0.15.4+ds/samtools/sam.c.pysam.c:136: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(strcpy(fn_list, fn_ref), ".fai"); data/python-pysam-0.15.4+ds/samtools/sam_opts.c:91:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ga->nthreads = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/sam_opts.c:97:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). hts_verbose = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/sam_opts.c.pysam.c:93:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ga->nthreads = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/sam_opts.c.pysam.c:99:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). hts_verbose = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/sam_view.c:158: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[1024]; data/python-pysam-0.15.4+ds/samtools/sam_view.c:168:10: [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). fp = fopen(fn, "r"); data/python-pysam-0.15.4+ds/samtools/sam_view.c:217: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[1024]; data/python-pysam-0.15.4+ds/samtools/sam_view.c:227:10: [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). fp = fopen(fn, "r"); data/python-pysam-0.15.4+ds/samtools/sam_view.c:269: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 out_mode[5], out_un_mode[5], *out_format = ""; data/python-pysam-0.15.4+ds/samtools/sam_view.c:335:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'm': settings.min_qlen = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/sam_view.c:349:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': settings.min_mapQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/sam_view.c:391:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(settings.tag, optarg, 2); data/python-pysam-0.15.4+ds/samtools/sam_view.c:421:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(settings.tag, optarg, 2); data/python-pysam-0.15.4+ds/samtools/sam_view.c:480: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[2]; data/python-pysam-0.15.4+ds/samtools/sam_view.c:594:22: [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). fp_out = fopen(fn_out, "w"); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:160: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[1024]; data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:170:10: [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). fp = fopen(fn, "r"); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:219: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[1024]; data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:229:10: [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). fp = fopen(fn, "r"); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:271: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 out_mode[5], out_un_mode[5], *out_format = ""; data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:337:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'm': settings.min_qlen = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:351:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': settings.min_mapQ = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:393:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(settings.tag, optarg, 2); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:423:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(settings.tag, optarg, 2); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:482: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[2]; data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:596:22: [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). fp_out = fopen(fn_out, "w"); data/python-pysam-0.15.4+ds/samtools/stats.c:131: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 tag_name[3]; data/python-pysam-0.15.4+ds/samtools/stats.c:132:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char qual_name[3]; data/python-pysam-0.15.4+ds/samtools/stats.c:703: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(rbuffer,stats->cov_rbuf.buffer+stats->cov_rbuf.start,n); data/python-pysam-0.15.4+ds/samtools/stats.c:705: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(rbuffer+n,stats->cov_rbuf.buffer,stats->cov_rbuf.start); data/python-pysam-0.15.4+ds/samtools/stats.c:1805:16: [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 *fp = fopen(file,"r"); data/python-pysam-0.15.4+ds/samtools/stats.c:2113:20: [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 *to = fopen(output_filename.s, "w"); data/python-pysam-0.15.4+ds/samtools/stats.c:2381:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': info->filter_readlen = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/stats.c:2382:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'i': info->nisize = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/stats.c:2384:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': info->trim_qual = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/stats.c:2391:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'g': info->cov_threshold = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:133: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 tag_name[3]; data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:134: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 qual_name[3]; data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:705: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(rbuffer,stats->cov_rbuf.buffer+stats->cov_rbuf.start,n); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:707: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(rbuffer+n,stats->cov_rbuf.buffer,stats->cov_rbuf.start); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:1807:16: [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 *fp = fopen(file,"r"); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:2115:20: [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 *to = fopen(output_filename.s, "w"); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:2383:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': info->filter_readlen = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:2384:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'i': info->nisize = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:2386:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': info->trim_qual = atoi(optarg); break; data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:2393:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'g': info->cov_threshold = atoi(optarg); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:125: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:165: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:206: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:281: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:324: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:387:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:425:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:463:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:500:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:537:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c:575:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:127: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:167: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:208: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:245: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:283: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:326: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(b->data, data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:389:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:427:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:465:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:502:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:539:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/merge/test_bam_translate.c.pysam.c:577:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_count_rg.c:97:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_count_rg.c.pysam.c:99:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_expand_format_string.c:101:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_expand_format_string.c.pysam.c:103:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c:211:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c:254:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c:296:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c.pysam.c:213:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c.pysam.c:256:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_filter_header_rg.c.pysam.c:298:13: [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). check = fopen(tempfname, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c:128:20: [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). check_stdout = fopen(tempfname_stdout, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c:129:20: [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). check_stderr = fopen(tempfname_stderr, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c:179:20: [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). check_stdout = fopen(tempfname_stdout, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c:180:20: [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). check_stderr = fopen(tempfname_stderr, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c.pysam.c:130:29: [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). check_samtools_stdout = fopen(tempfname_samtools_stdout, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c.pysam.c:131:29: [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). check_samtools_stderr = fopen(tempfname_samtools_stderr, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c.pysam.c:181:29: [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). check_samtools_stdout = fopen(tempfname_samtools_stdout, "r"); data/python-pysam-0.15.4+ds/samtools/test/split/test_parse_args.c.pysam.c:182:29: [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). check_samtools_stderr = fopen(tempfname_samtools_stderr, "r"); data/python-pysam-0.15.4+ds/samtools/test/test.c:51: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). int fd = open(path, O_WRONLY|O_TRUNC|O_CREAT, 0666); data/python-pysam-0.15.4+ds/samtools/test/test.c.pysam.c:53: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). int fd = open(path, O_WRONLY|O_TRUNC|O_CREAT, 0666); data/python-pysam-0.15.4+ds/samtools/tmp_file.c:114:19: [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 ((fd = open(tmp->name, O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) { data/python-pysam-0.15.4+ds/samtools/tmp_file.c:266: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(tmp->ring_index, inbam, sizeof(bam1_t)); data/python-pysam-0.15.4+ds/samtools/tmp_file.c:267: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(tmp->ring_index + sizeof(bam1_t) , inbam->data, inbam->l_data); data/python-pysam-0.15.4+ds/samtools/tmp_file.c:381: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(inbam, tmp->ring_index, sizeof(bam1_t)); data/python-pysam-0.15.4+ds/samtools/tmp_file.c:400: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(inbam->data, tmp->ring_index + entry_size, inbam->l_data); data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c:116:19: [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 ((fd = open(tmp->name, O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) { data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.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(tmp->ring_index, inbam, sizeof(bam1_t)); data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c:269: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(tmp->ring_index + sizeof(bam1_t) , inbam->data, inbam->l_data); data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c:383: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(inbam, tmp->ring_index, sizeof(bam1_t)); data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c:402: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(inbam->data, tmp->ring_index + entry_size, inbam->l_data); data/python-pysam-0.15.4+ds/win32/stdint.h:764: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 str0[256], str1[256]; data/python-pysam-0.15.4+ds/win32/stdint.h:766:2: [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 (str0, "%d %x\n", 0, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:768:2: [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 (str1, "%d %x\n", i8, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:770:2: [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 (str1, "%u %x\n", u8, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:772:2: [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 (str1, "%d %x\n", i16, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:774:2: [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 (str1, "%u %x\n", u16, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:776:2: [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 (str1, "%" PRINTF_INT32_MODIFIER "d %x\n", i32, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:778:2: [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 (str1, "%" PRINTF_INT32_MODIFIER "u %x\n", u32, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:781:2: [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 (str1, "%" PRINTF_INT64_MODIFIER "d %x\n", i64, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:784:2: [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 (str1, "%" PRINTF_INTMAX_MODIFIER "d %x\n", imax, ~0); data/python-pysam-0.15.4+ds/win32/stdint.h:786:2: [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 (str1, "%" PRINTF_INTMAX_MODIFIER "u %x\n", umax, ~0); data/python-pysam-0.15.4+ds/bcftools/cols.c:58:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t str_len = strlen(str); data/python-pysam-0.15.4+ds/bcftools/cols.c:59:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lst_len = strlen(cols->off[ cols->n - 1 ]); data/python-pysam-0.15.4+ds/bcftools/cols.c:70:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(cols->off[i]); data/python-pysam-0.15.4+ds/bcftools/cols.c.pysam.c:60:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t str_len = strlen(str); data/python-pysam-0.15.4+ds/bcftools/cols.c.pysam.c:61:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lst_len = strlen(cols->off[ cols->n - 1 ]); data/python-pysam-0.15.4+ds/bcftools/cols.c.pysam.c:72:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(cols->off[i]); data/python-pysam-0.15.4+ds/bcftools/consensus.c:505:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = jalt==0 ? rec->rlen : strlen(rec->d.allele[jalt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c:573: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c:591: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c:624: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c:629: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:507:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = jalt==0 ? rec->rlen : strlen(rec->d.allele[jalt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:575: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:593: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:626: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/consensus.c.pysam.c:631: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). alen = strlen(rec->d.allele[ialt]); data/python-pysam-0.15.4+ds/bcftools/convert.c:1116:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(convert->header->id[BCF_DT_CTG][line->rid].key), data/python-pysam-0.15.4+ds/bcftools/convert.c:1119:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(line->d.allele[0]), data/python-pysam-0.15.4+ds/bcftools/convert.c:1121:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(line->d.allele[1])); data/python-pysam-0.15.4+ds/bcftools/convert.c.pysam.c:1118:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(convert->header->id[BCF_DT_CTG][line->rid].key), data/python-pysam-0.15.4+ds/bcftools/convert.c.pysam.c:1121:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(line->d.allele[0]), data/python-pysam-0.15.4+ds/bcftools/convert.c.pysam.c:1123:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(line->d.allele[1])); data/python-pysam-0.15.4+ds/bcftools/csq.c:730: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). ss += strlen(needle); data/python-pysam-0.15.4+ds/bcftools/csq.c:1800: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). int ref_len = strlen(splice->vcf.ref); data/python-pysam-0.15.4+ds/bcftools/csq.c:1801: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). int alt_len = strlen(splice->vcf.alt); data/python-pysam-0.15.4+ds/bcftools/csq.c:2120:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). splice->vcf.alen = strlen(splice->vcf.alt); data/python-pysam-0.15.4+ds/bcftools/csq.c:2270:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int rlen = strlen(rec->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/csq.c:2271:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int alen = strlen(rec->d.allele[ial]); data/python-pysam-0.15.4+ds/bcftools/csq.c:3300:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert( vcf - rec->d.allele[0] < strlen(rec->d.allele[0]) && ref - tr->ref < tr->end - tr->beg + 2*N_REF_PAD ); data/python-pysam-0.15.4+ds/bcftools/csq.c:3370: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). int alen = sseq.l = strlen(sseq.s); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:732: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). ss += strlen(needle); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:1802: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). int ref_len = strlen(splice->vcf.ref); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:1803: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). int alt_len = strlen(splice->vcf.alt); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2122:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). splice->vcf.alen = strlen(splice->vcf.alt); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2272:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int rlen = strlen(rec->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:2273:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int alen = strlen(rec->d.allele[ial]); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:3302:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert( vcf - rec->d.allele[0] < strlen(rec->d.allele[0]) && ref - tr->ref < tr->end - tr->beg + 2*N_REF_PAD ); data/python-pysam-0.15.4+ds/bcftools/csq.c.pysam.c:3372: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). int alen = sseq.l = strlen(sseq.s); data/python-pysam-0.15.4+ds/bcftools/filter.c:971: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). int i, rlen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/filter.c:974:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int alen = strlen(line->d.allele[i]); data/python-pysam-0.15.4+ds/bcftools/filter.c:1343:43: [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 ( !*se ) rtok->values[i] = strlen(ss); data/python-pysam-0.15.4+ds/bcftools/filter.c:1347:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtok->values[i] = strlen(ss); data/python-pysam-0.15.4+ds/bcftools/filter.c:1360:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtok->values[0] = strlen(tok->str_value.s); data/python-pysam-0.15.4+ds/bcftools/filter.c:2058:18: [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 i, len = strlen(tag_idx); data/python-pysam-0.15.4+ds/bcftools/filter.c:2073: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). if (fname && strlen(fname) > 2 && fname[1] == ':') // Deal with Windows paths, such as 'C:\..' data/python-pysam-0.15.4+ds/bcftools/filter.c:2487: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 ( end - tmp.s != strlen(tmp.s) ) data/python-pysam-0.15.4+ds/bcftools/filter.c:2769:57: [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). filters_init1(filter, rmme_list[i], strlen(rmme_list[i]), &out[nout-1]); data/python-pysam-0.15.4+ds/bcftools/filter.c:2877: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). int len = strlen(out[j].key); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:973: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). int i, rlen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:976:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int alen = strlen(line->d.allele[i]); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1345:43: [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 ( !*se ) rtok->values[i] = strlen(ss); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1349:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtok->values[i] = strlen(ss); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:1362:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtok->values[0] = strlen(tok->str_value.s); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2060:18: [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 i, len = strlen(tag_idx); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2075: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). if (fname && strlen(fname) > 2 && fname[1] == ':') // Deal with Windows paths, such as 'C:\..' data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2489: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 ( end - tmp.s != strlen(tmp.s) ) data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2771:57: [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). filters_init1(filter, rmme_list[i], strlen(rmme_list[i]), &out[nout-1]); data/python-pysam-0.15.4+ds/bcftools/filter.c.pysam.c:2879: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). int len = strlen(out[j].key); data/python-pysam-0.15.4+ds/bcftools/mpileup.c:745:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/python-pysam-0.15.4+ds/bcftools/mpileup.c.pysam.c:747:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c:260:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( args.variant_type==VCF_SNP && strlen(rec->d.allele[ibig])!=strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c:260:77: [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 ( args.variant_type==VCF_SNP && strlen(rec->d.allele[ibig])!=strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c:261:50: [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 ( args.variant_type==VCF_INDEL && strlen(rec->d.allele[ibig])==strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c:261:79: [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 ( args.variant_type==VCF_INDEL && strlen(rec->d.allele[ibig])==strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c.pysam.c:262:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( args.variant_type==VCF_SNP && strlen(rec->d.allele[ibig])!=strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c.pysam.c:262:77: [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 ( args.variant_type==VCF_SNP && strlen(rec->d.allele[ibig])!=strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c.pysam.c:263:50: [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 ( args.variant_type==VCF_INDEL && strlen(rec->d.allele[ibig])==strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/ad-bias.c.pysam.c:263:79: [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 ( args.variant_type==VCF_INDEL && strlen(rec->d.allele[ibig])==strlen(rec->d.allele[ismall]) ) continue; data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c:67: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). strlen(in_hdr->id[BCF_DT_CTG][rec->rid].key), data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c:70: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). strlen(rec->d.allele[0]), data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c:72: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). strlen(rec->d.allele[1])); data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c.pysam.c:69: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). strlen(in_hdr->id[BCF_DT_CTG][rec->rid].key), data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c.pysam.c:72: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). strlen(rec->d.allele[0]), data/python-pysam-0.15.4+ds/bcftools/plugins/add-variantkey.c.pysam.c:74: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). strlen(rec->d.allele[1])); data/python-pysam-0.15.4+ds/bcftools/plugins/allele-length.c:90: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). int rl = strlen(rec->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/plugins/allele-length.c:91: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). int al = strlen(rec->d.allele[1]); data/python-pysam-0.15.4+ds/bcftools/plugins/allele-length.c.pysam.c:92: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). int rl = strlen(rec->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/plugins/allele-length.c.pysam.c:93: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). int al = strlen(rec->d.allele[1]); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c:185: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). int ref_len = strlen(ref); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c:199:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(rec->d.allele[0], fa, fa_len); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c.pysam.c:187: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). int ref_len = strlen(ref); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-from-fasta.c.pysam.c:201:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(rec->d.allele[0], fa, fa_len); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c:186:64: [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). args->pop[args->npop-1].suffix = (char*)malloc(strlen(pop_name)+2); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c:187:66: [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(args->pop[args->npop-1].suffix+1,pop_name,strlen(pop_name)+1); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c.pysam.c:188:64: [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). args->pop[args->npop-1].suffix = (char*)malloc(strlen(pop_name)+2); data/python-pysam-0.15.4+ds/bcftools/plugins/fill-tags.c.pysam.c:189:66: [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(args->pop[args->npop-1].suffix+1,pop_name,strlen(pop_name)+1); data/python-pysam-0.15.4+ds/bcftools/plugins/gvcfz.c:154:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). beg = grp->expr + strlen(grp->expr); while ( beg >= grp->expr && isspace(*beg) ) { *beg = 0; beg--; } data/python-pysam-0.15.4+ds/bcftools/plugins/gvcfz.c.pysam.c:156:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). beg = grp->expr + strlen(grp->expr); while ( beg >= grp->expr && isspace(*beg) ) { *beg = 0; beg--; } data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c:174: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). int detailed = 0, len = strlen(alias); data/python-pysam-0.15.4+ds/bcftools/plugins/mendelian.c.pysam.c:176: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). int detailed = 0, len = strlen(alias); data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c:230: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). int l = strlen(optarg); data/python-pysam-0.15.4+ds/bcftools/plugins/prune.c.pysam.c:232: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). int l = strlen(optarg); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:273:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(args->field[args->nfield-1]); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:319:43: [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 olen = args->column_str ? strlen(args->column_str) : 0; data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:320:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nlen = strlen(ptr) - 1; data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:408:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = args->annot_prefix ? strlen(args->annot_prefix) : 0; data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:415:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int clen = strlen(args->field[j]); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c:506: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). int len = strlen(sel_csq); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:275:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(args->field[args->nfield-1]); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:321:43: [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 olen = args->column_str ? strlen(args->column_str) : 0; data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:322:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nlen = strlen(ptr) - 1; data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:410:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = args->annot_prefix ? strlen(args->annot_prefix) : 0; data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:417:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int clen = strlen(args->field[j]); data/python-pysam-0.15.4+ds/bcftools/plugins/split-vep.c.pysam.c:508: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). int len = strlen(sel_csq); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:105: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). int len_ref = strlen(rec->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:106: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). int len_alt = strlen(rec->d.allele[1]); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c:109: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). strlen(in_hdr->id[BCF_DT_CTG][rec->rid].key), data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:107: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). int len_ref = strlen(rec->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:108: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). int len_alt = strlen(rec->d.allele[1]); data/python-pysam-0.15.4+ds/bcftools/plugins/variantkey-hex.c.pysam.c:111: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). strlen(in_hdr->id[BCF_DT_CTG][rec->rid].key), data/python-pysam-0.15.4+ds/bcftools/regidx.c:228: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). int len = strlen(fname); data/python-pysam-0.15.4+ds/bcftools/regidx.c.pysam.c:230: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). int len = strlen(fname); data/python-pysam-0.15.4+ds/bcftools/reheader.c:155:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp_path) + strlen("/bcftools-fai-header-XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/reheader.c:155: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). if (strlen(tmp_path) + strlen("/bcftools-fai-header-XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c:157:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp_path) + strlen("/bcftools-fai-header-XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/reheader.c.pysam.c:157: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). if (strlen(tmp_path) + strlen("/bcftools-fai-header-XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/tabix.c:87:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(argv[optind]); data/python-pysam-0.15.4+ds/bcftools/tabix.c:97: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). fn = (char*)malloc(strlen(argv[optind]) + 5); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:89:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(argv[optind]); data/python-pysam-0.15.4+ds/bcftools/tabix.c.pysam.c:99: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). fn = (char*)malloc(strlen(argv[optind]) + 5); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c:953:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(tab->cols[col->icol]); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c:2332: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). int len = strlen(args->targets_fname); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c.pysam.c:955:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(tab->cols[col->icol]); data/python-pysam-0.15.4+ds/bcftools/vcfannotate.c.pysam.c:2334: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). int len = strlen(args->targets_fname); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c:119:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c:816: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). int detailed = 0, len = strlen(alias); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c.pysam.c:121:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name); data/python-pysam-0.15.4+ds/bcftools/vcfcall.c.pysam.c:818: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). int detailed = 0, len = strlen(alias); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:733: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(files[0]) && strcmp(files[0],".")!=0) gen_fname = strdup(files[0]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:734: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(files[1]) && strcmp(files[1],".")!=0) sample_fname = strdup(files[1]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:743:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( gen_fname && (strlen(gen_fname)<3 || strcasecmp(".gz",gen_fname+strlen(gen_fname)-3)) ) gen_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:743:74: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( gen_fname && (strlen(gen_fname)<3 || strcasecmp(".gz",gen_fname+strlen(gen_fname)-3)) ) gen_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:744:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:744:82: [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 ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:855: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(files[0]) && strcmp(files[0],".")!=0) hap_fname = strdup(files[0]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:856: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(files[1]) && strcmp(files[1],".")!=0) legend_fname = strdup(files[1]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:857: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(files[2]) && strcmp(files[2],".")!=0) sample_fname = strdup(files[2]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:866:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:866:74: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:867:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( legend_fname && (strlen(legend_fname)<3 || strcasecmp(".gz",legend_fname+strlen(legend_fname)-3)) ) legend_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:867:83: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( legend_fname && (strlen(legend_fname)<3 || strcasecmp(".gz",legend_fname+strlen(legend_fname)-3)) ) legend_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:868:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:868:82: [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 ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1005: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(files[0]) && strcmp(files[0],".")!=0) hap_fname = strdup(files[0]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1006: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(files[1]) && strcmp(files[1],".")!=0) sample_fname = strdup(files[1]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1015:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1015:74: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1016:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1016:82: [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 ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c:1360:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(line->d.allele[0],ref,len); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:735: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(files[0]) && strcmp(files[0],".")!=0) gen_fname = strdup(files[0]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:736: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(files[1]) && strcmp(files[1],".")!=0) sample_fname = strdup(files[1]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:745:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( gen_fname && (strlen(gen_fname)<3 || strcasecmp(".gz",gen_fname+strlen(gen_fname)-3)) ) gen_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:745:74: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( gen_fname && (strlen(gen_fname)<3 || strcasecmp(".gz",gen_fname+strlen(gen_fname)-3)) ) gen_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:746:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:746:82: [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 ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:857: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(files[0]) && strcmp(files[0],".")!=0) hap_fname = strdup(files[0]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:858: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(files[1]) && strcmp(files[1],".")!=0) legend_fname = strdup(files[1]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:859: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(files[2]) && strcmp(files[2],".")!=0) sample_fname = strdup(files[2]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:868:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:868:74: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:869:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( legend_fname && (strlen(legend_fname)<3 || strcasecmp(".gz",legend_fname+strlen(legend_fname)-3)) ) legend_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:869:83: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( legend_fname && (strlen(legend_fname)<3 || strcasecmp(".gz",legend_fname+strlen(legend_fname)-3)) ) legend_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:870:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:870:82: [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 ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1007: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(files[0]) && strcmp(files[0],".")!=0) hap_fname = strdup(files[0]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1008: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(files[1]) && strcmp(files[1],".")!=0) sample_fname = strdup(files[1]); data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1017:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1017:74: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( hap_fname && (strlen(hap_fname)<3 || strcasecmp(".gz",hap_fname+strlen(hap_fname)-3)) ) hap_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1018:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1018:82: [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 ( sample_fname && strlen(sample_fname)>3 && strcasecmp(".gz",sample_fname+strlen(sample_fname)-3)==0 ) sample_compressed = 0; data/python-pysam-0.15.4+ds/bcftools/vcfconvert.c.pysam.c:1362:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(line->d.allele[0],ref,len); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c:62:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(script); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c:702:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(prefix); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c.pysam.c:64:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(script); data/python-pysam-0.15.4+ds/bcftools/vcfgtcheck.c.pysam.c:704:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(prefix); data/python-pysam-0.15.4+ds/bcftools/vcfisec.c:307: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 ( strlen(args->isec_exact)!=args->files->nreaders ) data/python-pysam-0.15.4+ds/bcftools/vcfisec.c.pysam.c:309: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 ( strlen(args->isec_exact)!=args->files->nreaders ) data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:415:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp,(char*)args->maux->tmp_arr,ret); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:518: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). int len = strlen(name) + strlen(clash_prefix) + 1; data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:518:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name) + strlen(clash_prefix) + 1; data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:552:38: [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 (j=0; j<nals; j++) lens[j] = strlen(als[j]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:599: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). int rla = !a[0][1] ? 1 : strlen(a[0]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:600: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). int rlb = !b[0][1] ? 1 : strlen(b[0]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:620: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). int len = strlen(a[i]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:625: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). int len = strlen(b[i]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:640:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(b[i]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c:653:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(a[i]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:417:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp,(char*)args->maux->tmp_arr,ret); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:520: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). int len = strlen(name) + strlen(clash_prefix) + 1; data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:520:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name) + strlen(clash_prefix) + 1; data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:554:38: [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 (j=0; j<nals; j++) lens[j] = strlen(als[j]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:601: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). int rla = !a[0][1] ? 1 : strlen(a[0]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:602: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). int rlb = !b[0][1] ? 1 : strlen(b[0]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:622: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). int len = strlen(a[i]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:627: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). int len = strlen(b[i]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:642:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(b[i]); data/python-pysam-0.15.4+ds/bcftools/vcfmerge.c.pysam.c:655:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(a[i]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:138:18: [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 reflen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:142: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). int len = strlen(line->d.allele[i]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:166:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( replace_iupac_codes(line->d.allele[0],strlen(line->d.allele[0])) ) data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:176: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). int len = strlen(line->d.allele[i]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:303:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i, nref, reflen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c:444: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). int new_reflen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:140:18: [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 reflen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:144: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). int len = strlen(line->d.allele[i]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:168:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( replace_iupac_codes(line->d.allele[0],strlen(line->d.allele[0])) ) data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:178: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). int len = strlen(line->d.allele[i]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:305:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i, nref, reflen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/vcfnorm.c.pysam.c:446: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). int new_reflen = strlen(line->d.allele[0]); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:172:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dir, path, len); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:449:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int plugin_ext_len = strlen(PLUGIN_EXT); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c:459: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). int len = strlen(ep->d_name); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:174:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dir, path, len); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:451:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int plugin_ext_len = strlen(PLUGIN_EXT); data/python-pysam-0.15.4+ds/bcftools/vcfplugin.c.pysam.c:461: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). int len = strlen(ep->d_name); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:282:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp_path) + strlen("/bcftools-sort.XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:282: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). if (strlen(tmp_path) + strlen("/bcftools-sort.XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/vcfsort.c:289:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(args->tmp_dir); data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:284:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp_path) + strlen("/bcftools-sort.XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:284: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). if (strlen(tmp_path) + strlen("/bcftools-sort.XXXXXX") >= MAX_PATH) data/python-pysam-0.15.4+ds/bcftools/vcfsort.c.pysam.c:291:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(args->tmp_dir); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c:299: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). int ref_len = strlen(ref); data/python-pysam-0.15.4+ds/bcftools/vcfstats.c.pysam.c:301: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). int ref_len = strlen(ref); data/python-pysam-0.15.4+ds/bcftools/vcfview.c:179:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(type_list[n++], q, p - q); data/python-pysam-0.15.4+ds/bcftools/vcfview.c:225:5: [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(modew, "w"); data/python-pysam-0.15.4+ds/bcftools/vcfview.c:228:42: [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. else if (args->output_type & FT_BCF) strcat(modew, "b"); // compressed BCF data/python-pysam-0.15.4+ds/bcftools/vcfview.c:229:41: [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. else if (args->output_type & FT_GZ) strcat(modew,"z"); // compressed VCF data/python-pysam-0.15.4+ds/bcftools/vcfview.c:648:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%d:%8s",&args->min_ac, allele_type)!=2 && sscanf(optarg,"%d",&args->min_ac)!=1 ) data/python-pysam-0.15.4+ds/bcftools/vcfview.c:657:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%d:%8s",&args->max_ac, allele_type)!=2 && sscanf(optarg,"%d",&args->max_ac)!=1 ) data/python-pysam-0.15.4+ds/bcftools/vcfview.c:666:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%f:%8s",&args->min_af, allele_type)!=2 && sscanf(optarg,"%f",&args->min_af)!=1 ) data/python-pysam-0.15.4+ds/bcftools/vcfview.c:675:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%f:%8s",&args->max_af, allele_type)!=2 && sscanf(optarg,"%f",&args->max_af)!=1 ) data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:181:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(type_list[n++], q, p - q); data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:227:5: [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(modew, "w"); data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:230:42: [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. else if (args->output_type & FT_BCF) strcat(modew, "b"); // compressed BCF data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:231:41: [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. else if (args->output_type & FT_GZ) strcat(modew,"z"); // compressed VCF data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:650:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%d:%8s",&args->min_ac, allele_type)!=2 && sscanf(optarg,"%d",&args->min_ac)!=1 ) data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:659:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%d:%8s",&args->max_ac, allele_type)!=2 && sscanf(optarg,"%d",&args->max_ac)!=1 ) data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:668:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%f:%8s",&args->min_af, allele_type)!=2 && sscanf(optarg,"%f",&args->min_af)!=1 ) data/python-pysam-0.15.4+ds/bcftools/vcfview.c.pysam.c:677:22: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if ( sscanf(optarg,"%f:%8s",&args->max_af, allele_type)!=2 && sscanf(optarg,"%f",&args->max_af)!=1 ) data/python-pysam-0.15.4+ds/pysam/pysam_util.c:30: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). return (strlen(*line)); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:97:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). out = ptr = malloc(strlen(in)+1); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:143: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). size_t len = slim? (slim - s) : strlen(s); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:206: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 (strlen(optarg)<3 || (optarg[0] != '@' && optarg[1] != 'R' && optarg[2] != 'G')) { data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:293:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(state->rg_id)+1; data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:307:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(state->rg_id)+1; data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c:358:75: [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 (-1 == sam_hdr_add_lines(retval->output_header, opts->rg_line, strlen(opts->rg_line))) { data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:99:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). out = ptr = malloc(strlen(in)+1); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:145: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). size_t len = slim? (slim - s) : strlen(s); data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:208: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 (strlen(optarg)<3 || (optarg[0] != '@' && optarg[1] != 'R' && optarg[2] != 'G')) { data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:295:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(state->rg_id)+1; data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:309:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(state->rg_id)+1; data/python-pysam-0.15.4+ds/samtools/bam_addrprg.c.pysam.c:360:75: [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 (-1 == sam_hdr_add_lines(retval->output_header, opts->rg_line, strlen(opts->rg_line))) { data/python-pysam-0.15.4+ds/samtools/bam_color.c:49: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). i = strlen(cs) - 1 - i; data/python-pysam-0.15.4+ds/samtools/bam_color.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). i = strlen(cq) - 1 - i; data/python-pysam-0.15.4+ds/samtools/bam_color.c:139: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). cs_i = strlen(cs) - 1 - i; data/python-pysam-0.15.4+ds/samtools/bam_color.c.pysam.c:51: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). i = strlen(cs) - 1 - i; data/python-pysam-0.15.4+ds/samtools/bam_color.c.pysam.c:80: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). i = strlen(cq) - 1 - i; data/python-pysam-0.15.4+ds/samtools/bam_color.c.pysam.c:141: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). cs_i = strlen(cs) - 1 - i; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:177: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 i = strlen(str)-1,j=0; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:197:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read) return NULL; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:200:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (rec->core.flag & BAM_FREVERSE) read[n] = seq_nt16_str[seq_comp_table[bam_seqi(seq,n)]]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:201:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else read[n] = seq_nt16_str[bam_seqi(seq,n)]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:203:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (rec->core.flag & BAM_FREVERSE) reverse(read); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:204:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:310:46: [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 (ks_resize(&new, linebuf->l + strlen(index_sequence) + 16) < 0) data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:381: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). int len = strlen(seq); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:415:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tag_len = strlen(tag); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:457:75: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *new_index_sequence = realloc(state->index_sequence, strlen(state->index_sequence) + strlen(sub_tag) + 2); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:457:107: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *new_index_sequence = realloc(state->index_sequence, strlen(state->index_sequence) + strlen(sub_tag) + 2); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:686:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(filename); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c:729: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). if (strlen(s) != 2) { data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:179: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 i = strlen(str)-1,j=0; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:199:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read) return NULL; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:202:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (rec->core.flag & BAM_FREVERSE) read[n] = seq_nt16_str[seq_comp_table[bam_seqi(seq,n)]]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:203:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else read[n] = seq_nt16_str[bam_seqi(seq,n)]; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:205:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (rec->core.flag & BAM_FREVERSE) reverse(read); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:206:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read; data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:312:46: [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 (ks_resize(&new, linebuf->l + strlen(index_sequence) + 16) < 0) data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:383: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). int len = strlen(seq); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:417:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tag_len = strlen(tag); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:459:75: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *new_index_sequence = realloc(state->index_sequence, strlen(state->index_sequence) + strlen(sub_tag) + 2); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:459:107: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *new_index_sequence = realloc(state->index_sequence, strlen(state->index_sequence) + strlen(sub_tag) + 2); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:688:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(filename); data/python-pysam-0.15.4+ds/samtools/bam_fastq.c.pysam.c:731: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). if (strlen(s) != 2) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:817:44: [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 (bam_aux_append(dup, "do", 'Z', strlen(bam_get_qname(ori)) + 1, (uint8_t*)bam_get_qname(ori))) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:928:67: [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 (bam_aux_append(current->b, "do", 'Z', strlen(ori_name) + 1, (uint8_t*)ori_name)) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c:1609:58: [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 (bam_aux_append(b, "do", 'Z', strlen(kh_val(dup_hash, k).name) + 1, (uint8_t*)kh_val(dup_hash, k).name)) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:819:44: [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 (bam_aux_append(dup, "do", 'Z', strlen(bam_get_qname(ori)) + 1, (uint8_t*)bam_get_qname(ori))) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:930:67: [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 (bam_aux_append(current->b, "do", 'Z', strlen(ori_name) + 1, (uint8_t*)ori_name)) { data/python-pysam-0.15.4+ds/samtools/bam_markdup.c.pysam.c:1611:58: [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 (bam_aux_append(b, "do", 'Z', strlen(kh_val(dup_hash, k).name) + 1, (uint8_t*)kh_val(dup_hash, k).name)) { data/python-pysam-0.15.4+ds/samtools/bam_md.c:133: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). if (strlen((char*)old_md+1) == str->l) { data/python-pysam-0.15.4+ds/samtools/bam_md.c:207:5: [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(mode_w, "w"); data/python-pysam-0.15.4+ds/samtools/bam_md.c:231:21: [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. if (is_bam_out) strcat(mode_w, "b"); data/python-pysam-0.15.4+ds/samtools/bam_md.c:232:10: [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. else strcat(mode_w, "h"); data/python-pysam-0.15.4+ds/samtools/bam_md.c:233:26: [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. if (is_uncompressed) strcat(mode_w, "0"); data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:135: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). if (strlen((char*)old_md+1) == str->l) { data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:209:5: [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(mode_w, "w"); data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:233:21: [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. if (is_bam_out) strcat(mode_w, "b"); data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:234:10: [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. else strcat(mode_w, "h"); data/python-pysam-0.15.4+ds/samtools/bam_md.c.pysam.c:235:26: [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. if (is_uncompressed) strcat(mode_w, "0"); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:216: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). if (strlen(tag) != 2) { data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c:1018:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:218: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). if (strlen(tag) != 2) { data/python-pysam-0.15.4+ds/samtools/bam_plcmd.c.pysam.c:1020:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/python-pysam-0.15.4+ds/samtools/bam_reheader.c:478:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int comm_len = strlen(external) + strlen(tmp_fn) + 8; data/python-pysam-0.15.4+ds/samtools/bam_reheader.c:478:39: [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 comm_len = strlen(external) + strlen(tmp_fn) + 8; data/python-pysam-0.15.4+ds/samtools/bam_reheader.c.pysam.c:480:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int comm_len = strlen(external) + strlen(tmp_fn) + 8; data/python-pysam-0.15.4+ds/samtools/bam_reheader.c.pysam.c:480:39: [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 comm_len = strlen(external) + strlen(tmp_fn) + 8; data/python-pysam-0.15.4+ds/samtools/bam_sort.c:619:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!end) end = id + strlen(id); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:834:46: [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). bam_aux_append(b, "RG", 'Z', strlen(translate_rg) + 1, data/python-pysam-0.15.4+ds/samtools/bam_sort.c:864:46: [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). bam_aux_append(b, "PG", 'Z', strlen(translate_pg) + 1, data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1019:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(fn[i]); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1028:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(RG[i], s + j, l); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1323:30: [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. if (flag & MERGE_UNCOMP) strcat(mode, "0"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1324:35: [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. else if (flag & MERGE_LEVEL1) strcat(mode, "1"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:1965:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = (char*)calloc(strlen(w->prefix) + 20, 1); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2221:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fns[i] = (char*)calloc(strlen(prefix) + 20, 1); data/python-pysam-0.15.4+ds/samtools/bam_sort.c:2261:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *fnout = calloc(strlen(prefix) + 4 + 1, 1); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:621:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!end) end = id + strlen(id); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:836:46: [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). bam_aux_append(b, "RG", 'Z', strlen(translate_rg) + 1, data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:866:46: [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). bam_aux_append(b, "PG", 'Z', strlen(translate_pg) + 1, data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1021:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(fn[i]); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1030:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(RG[i], s + j, l); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1325:30: [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. if (flag & MERGE_UNCOMP) strcat(mode, "0"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1326:35: [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. else if (flag & MERGE_LEVEL1) strcat(mode, "1"); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:1967:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = (char*)calloc(strlen(w->prefix) + 20, 1); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2223:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fns[i] = (char*)calloc(strlen(prefix) + 20, 1); data/python-pysam-0.15.4+ds/samtools/bam_sort.c.pysam.c:2263:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *fnout = calloc(strlen(prefix) + 4 + 1, 1); data/python-pysam-0.15.4+ds/samtools/bamshuf.c:225:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(pre); data/python-pysam-0.15.4+ds/samtools/bamshuf.c:241: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). j = strlen(modew); data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:227:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(pre); data/python-pysam-0.15.4+ds/samtools/bamshuf.c.pysam.c:243: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). j = strlen(modew); data/python-pysam-0.15.4+ds/samtools/bedidx.c:523:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(reg, regs[i], q - regs[i]); data/python-pysam-0.15.4+ds/samtools/bedidx.c:527: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). if (strlen(regs[i]) + 1 > 1024) { data/python-pysam-0.15.4+ds/samtools/bedidx.c.pysam.c:525:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(reg, regs[i], q - regs[i]); data/python-pysam-0.15.4+ds/samtools/bedidx.c.pysam.c:529: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). if (strlen(regs[i]) + 1 > 1024) { data/python-pysam-0.15.4+ds/samtools/coverage.c:151:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(text); data/python-pysam-0.15.4+ds/samtools/coverage.c.pysam.c:153:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(text); data/python-pysam-0.15.4+ds/samtools/faidx.c:283:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(optarg + 7); data/python-pysam-0.15.4+ds/samtools/faidx.c.pysam.c:285:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(optarg + 7); data/python-pysam-0.15.4+ds/samtools/padding.c:445:5: [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(in_mode, "r"); strcpy(out_mode, "w"); data/python-pysam-0.15.4+ds/samtools/padding.c:445:27: [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(in_mode, "r"); strcpy(out_mode, "w"); data/python-pysam-0.15.4+ds/samtools/padding.c:471:5: [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(out_mode, "h"); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:447:5: [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(in_mode, "r"); strcpy(out_mode, "w"); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:447:27: [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(in_mode, "r"); strcpy(out_mode, "w"); data/python-pysam-0.15.4+ds/samtools/padding.c.pysam.c:473:5: [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(out_mode, "h"); data/python-pysam-0.15.4+ds/samtools/sam.c:133: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). fn_list = calloc(strlen(fn_ref) + 5, 1); data/python-pysam-0.15.4+ds/samtools/sam.c.pysam.c:135: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). fn_list = calloc(strlen(fn_ref) + 5, 1); data/python-pysam-0.15.4+ds/samtools/sam_opts.c:68: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). char *ref = malloc(10 + strlen(optarg) + 1); data/python-pysam-0.15.4+ds/samtools/sam_opts.c.pysam.c:70: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). char *ref = malloc(10 + strlen(optarg) + 1); data/python-pysam-0.15.4+ds/samtools/sam_utils.c:110:18: [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). delim += strlen(HTS_IDX_DELIM); data/python-pysam-0.15.4+ds/samtools/sam_utils.c:116:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(fn_idx); data/python-pysam-0.15.4+ds/samtools/sam_utils.c:124: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). fn_idx = malloc(strlen(fn)+6); data/python-pysam-0.15.4+ds/samtools/sam_utils.c.pysam.c:112:18: [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). delim += strlen(HTS_IDX_DELIM); data/python-pysam-0.15.4+ds/samtools/sam_utils.c.pysam.c:118:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(fn_idx); data/python-pysam-0.15.4+ds/samtools/sam_utils.c.pysam.c:126: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). fn_idx = malloc(strlen(fn)+6); data/python-pysam-0.15.4+ds/samtools/sam_view.c:174:38: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (ret != -1 && !feof(fp) && fscanf(fp, "%1023s", buf) > 0) { data/python-pysam-0.15.4+ds/samtools/sam_view.c:233:38: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (ret != -1 && !feof(fp) && fscanf(fp, "%1023s", buf) > 0) { data/python-pysam-0.15.4+ds/samtools/sam_view.c:301:5: [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(out_mode, "w"); data/python-pysam-0.15.4+ds/samtools/sam_view.c:302:5: [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(out_un_mode, "w"); data/python-pysam-0.15.4+ds/samtools/sam_view.c:373: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). if (strlen(optarg) < 4 || optarg[2] != ':') { data/python-pysam-0.15.4+ds/samtools/sam_view.c:403: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). if (strlen(optarg) < 4 || (optarg[2] != ':' && optarg[2] != ';')) { data/python-pysam-0.15.4+ds/samtools/sam_view.c:453:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(optarg) != 2) { data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:176:38: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (ret != -1 && !feof(fp) && fscanf(fp, "%1023s", buf) > 0) { data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:235:38: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (ret != -1 && !feof(fp) && fscanf(fp, "%1023s", buf) > 0) { data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:303:5: [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(out_mode, "w"); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:304:5: [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(out_un_mode, "w"); data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:375: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). if (strlen(optarg) < 4 || optarg[2] != ':') { data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:405: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). if (strlen(optarg) < 4 || (optarg[2] != ':' && optarg[2] != ';')) { data/python-pysam-0.15.4+ds/samtools/sam_view.c.pysam.c:455:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(optarg) != 2) { data/python-pysam-0.15.4+ds/samtools/stats.c:501:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t cread = bam_seqi(read,iread); data/python-pysam-0.15.4+ds/samtools/stats.c:748: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). uint32_t barcode_len = strlen(barcode); data/python-pysam-0.15.4+ds/samtools/stats.c:826: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). uint32_t barqual_len = strlen(barqual); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:503:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint8_t cread = bam_seqi(read,iread); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:750: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). uint32_t barcode_len = strlen(barcode); data/python-pysam-0.15.4+ds/samtools/stats.c.pysam.c:828: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). uint32_t barqual_len = strlen(barqual); data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:74:66: [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 (!bam0 || -1 == sam_hdr_add_lines(bam0, bam0_header_text, strlen(bam0_header_text))) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:80:66: [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 (!bam1 || -1 == sam_hdr_add_lines(bam1, bam1_header_text, strlen(bam1_header_text))) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:120: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). || sam_hdr_length(translate) != strlen( test_1_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:160:38: [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 (sam_hdr_length(translate) != strlen(test_2_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:205: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). || sam_hdr_length(translate) != strlen(test_3_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:237: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). || sam_hdr_length(translate) != strlen(test_4_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:273: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). || sam_hdr_length(translate) != strlen(test_5_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c:302: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). || sam_hdr_length(translate) != strlen(test_5_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:76:66: [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 (!bam0 || -1 == sam_hdr_add_lines(bam0, bam0_header_text, strlen(bam0_header_text))) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:82:66: [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 (!bam1 || -1 == sam_hdr_add_lines(bam1, bam1_header_text, strlen(bam1_header_text))) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:122: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). || sam_hdr_length(translate) != strlen( test_1_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:162:38: [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 (sam_hdr_length(translate) != strlen(test_2_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:207: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). || sam_hdr_length(translate) != strlen(test_3_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:239: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). || sam_hdr_length(translate) != strlen(test_4_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:275: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). || sam_hdr_length(translate) != strlen(test_5_trans_text) data/python-pysam-0.15.4+ds/samtools/test/merge/test_trans_tbl_init.c.pysam.c:304: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). || sam_hdr_length(translate) != strlen(test_5_trans_text) data/python-pysam-0.15.4+ds/samtools/tmp_file.c:101: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). if ((tmp->name = malloc(strlen(tmp_name) + 7)) == NULL) { data/python-pysam-0.15.4+ds/samtools/tmp_file.c.pysam.c:103: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). if ((tmp->name = malloc(strlen(tmp_name) + 7)) == NULL) { data/python-pysam-0.15.4+ds/win32/getopt.c:239:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # if (!defined __STDC__ || !__STDC__) && !defined strlen data/python-pysam-0.15.4+ds/win32/getopt.c:242: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). extern int strlen (const char *); data/python-pysam-0.15.4+ds/win32/getopt.c:433:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = nonoption_flags_max_len = strlen (orig_str); data/python-pysam-0.15.4+ds/win32/getopt.c:661:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). == (unsigned int) strlen (p->name)) data/python-pysam-0.15.4+ds/win32/getopt.c:704: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). nextchar += strlen (nextchar); data/python-pysam-0.15.4+ds/win32/getopt.c:766:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/python-pysam-0.15.4+ds/win32/getopt.c:799:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/python-pysam-0.15.4+ds/win32/getopt.c:804: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). nextchar += strlen (nextchar); data/python-pysam-0.15.4+ds/win32/getopt.c:981:58: [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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/python-pysam-0.15.4+ds/win32/getopt.c:1020: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). nextchar += strlen (nextchar); data/python-pysam-0.15.4+ds/win32/getopt.c:1057: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). nextchar += strlen (nextchar); data/python-pysam-0.15.4+ds/win32/getopt.c:1088: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). nextchar += strlen (nextchar); data/python-pysam-0.15.4+ds/win32/getopt.c:1092: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). nextchar += strlen (nextchar); ANALYSIS SUMMARY: Hits = 1524 Lines analyzed = 174661 in approximately 6.60 seconds (26480 lines/second) Physical Source Lines of Code (SLOC) = 140745 Hits@level = [0] 5346 [1] 408 [2] 711 [3] 229 [4] 174 [5] 2 Hits@level+ = [0+] 6870 [1+] 1524 [2+] 1116 [3+] 405 [4+] 176 [5+] 2 Hits/KSLOC@level+ = [0+] 48.8117 [1+] 10.8281 [2+] 7.92923 [3+] 2.87754 [4+] 1.25049 [5+] 0.0142101 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.