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/bedtools-2.29.2+dfsg/src/annotateBed/annotateBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/annotateBed/annotateBed.h
Examining data/bedtools-2.29.2+dfsg/src/annotateBed/annotateMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/bamToBed/bamToBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/bamToFastq/bamToFastq.cpp
Examining data/bedtools-2.29.2+dfsg/src/bamToFastq/bamToFastq.h
Examining data/bedtools-2.29.2+dfsg/src/bamToFastq/bamToFastqMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/bed12ToBed6/bed12ToBed6.cpp
Examining data/bedtools-2.29.2+dfsg/src/bedToBam/bedToBam.cpp
Examining data/bedtools-2.29.2+dfsg/src/bedToIgv/bedToIgv.cpp
Examining data/bedtools-2.29.2+dfsg/src/bedpeToBam/bedpeToBam.cpp
Examining data/bedtools-2.29.2+dfsg/src/bedtools.cpp
Examining data/bedtools-2.29.2+dfsg/src/closestFile/closestFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/closestFile/closestFile.h
Examining data/bedtools-2.29.2+dfsg/src/closestFile/closestHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/clusterBed/clusterBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/clusterBed/clusterBed.h
Examining data/bedtools-2.29.2+dfsg/src/clusterBed/clusterMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/complementFile/complementFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/complementFile/complementFile.h
Examining data/bedtools-2.29.2+dfsg/src/complementFile/complementHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/coverageFile/coverageFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/coverageFile/coverageFile.h
Examining data/bedtools-2.29.2+dfsg/src/coverageFile/coverageHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/expand/expand.cpp
Examining data/bedtools-2.29.2+dfsg/src/fastaFromBed/fastaFromBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/fastaFromBed/fastaFromBed.h
Examining data/bedtools-2.29.2+dfsg/src/fastaFromBed/fastaFromBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/fisher/fisher.cpp
Examining data/bedtools-2.29.2+dfsg/src/fisher/fisher.h
Examining data/bedtools-2.29.2+dfsg/src/fisher/fisherHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/fisher/kfunc.cpp
Examining data/bedtools-2.29.2+dfsg/src/fisher/kfunc.h
Examining data/bedtools-2.29.2+dfsg/src/flankBed/flankBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/flankBed/flankBed.h
Examining data/bedtools-2.29.2+dfsg/src/flankBed/flankBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/genomeCoverageBed/genomeCoverageBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/genomeCoverageBed/genomeCoverageBed.h
Examining data/bedtools-2.29.2+dfsg/src/genomeCoverageBed/genomeCoverageMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/getOverlap/getOverlap.cpp
Examining data/bedtools-2.29.2+dfsg/src/groupBy/groupBy.cpp
Examining data/bedtools-2.29.2+dfsg/src/groupBy/groupBy.h
Examining data/bedtools-2.29.2+dfsg/src/groupBy/groupByHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/intersectFile/intersectFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/intersectFile/intersectFile.h
Examining data/bedtools-2.29.2+dfsg/src/intersectFile/intersectHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/jaccard/jaccard.cpp
Examining data/bedtools-2.29.2+dfsg/src/jaccard/jaccard.h
Examining data/bedtools-2.29.2+dfsg/src/jaccard/jaccardHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/linksBed/linksBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/linksBed/linksBed.h
Examining data/bedtools-2.29.2+dfsg/src/linksBed/linksMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/mapFile/mapFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/mapFile/mapFile.h
Examining data/bedtools-2.29.2+dfsg/src/mapFile/mapHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/maskFastaFromBed/maskFastaFromBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/maskFastaFromBed/maskFastaFromBed.h
Examining data/bedtools-2.29.2+dfsg/src/maskFastaFromBed/maskFastaFromBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/mergeFile/mergeFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/mergeFile/mergeFile.h
Examining data/bedtools-2.29.2+dfsg/src/mergeFile/mergeHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/multiBamCov/multiBamCov.cpp
Examining data/bedtools-2.29.2+dfsg/src/multiBamCov/multiBamCov.h
Examining data/bedtools-2.29.2+dfsg/src/multiBamCov/multiBamCovMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/multiIntersectBed/multiIntersectBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/multiIntersectBed/multiIntersectBed.h
Examining data/bedtools-2.29.2+dfsg/src/multiIntersectBed/multiIntersectBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/nekSandbox1/FormatGuess.h
Examining data/bedtools-2.29.2+dfsg/src/nekSandbox1/nekSandboxMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/nucBed/LargeFileSupport.h
Examining data/bedtools-2.29.2+dfsg/src/nucBed/nucBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/nucBed/nucBed.h
Examining data/bedtools-2.29.2+dfsg/src/nucBed/nucBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/pairToBed/pairToBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/pairToBed/pairToBed.h
Examining data/bedtools-2.29.2+dfsg/src/pairToBed/pairToBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/pairToPair/pairToPair.cpp
Examining data/bedtools-2.29.2+dfsg/src/pairToPair/pairToPair.h
Examining data/bedtools-2.29.2+dfsg/src/pairToPair/pairToPairMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/randomBed/randomBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/randomBed/randomBed.h
Examining data/bedtools-2.29.2+dfsg/src/randomBed/randomBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp
Examining data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.h
Examining data/bedtools-2.29.2+dfsg/src/regressTest/regressTestMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/reldist/reldist.cpp
Examining data/bedtools-2.29.2+dfsg/src/reldist/reldist.h
Examining data/bedtools-2.29.2+dfsg/src/reldist/reldistMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/sampleFile/sampleFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/sampleFile/sampleFile.h
Examining data/bedtools-2.29.2+dfsg/src/sampleFile/sampleHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/shiftBed/shiftBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/shiftBed/shiftBed.h
Examining data/bedtools-2.29.2+dfsg/src/shiftBed/shiftBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBed.h
Examining data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/slopBed/slopBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/slopBed/slopBed.h
Examining data/bedtools-2.29.2+dfsg/src/slopBed/slopBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/sortBed/sortBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/sortBed/sortBed.h
Examining data/bedtools-2.29.2+dfsg/src/sortBed/sortMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/spacingFile/spacingFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/spacingFile/spacingFile.h
Examining data/bedtools-2.29.2+dfsg/src/spacingFile/spacingHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/split/splitBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/split/splitBed.h
Examining data/bedtools-2.29.2+dfsg/src/split/splitBedMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/subtractFile/subtractFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/subtractFile/subtractFile.h
Examining data/bedtools-2.29.2+dfsg/src/subtractFile/subtractHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/summaryFile/summaryFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/summaryFile/summaryFile.h
Examining data/bedtools-2.29.2+dfsg/src/summaryFile/summaryHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/tagBam/tagBam.cpp
Examining data/bedtools-2.29.2+dfsg/src/tagBam/tagBam.h
Examining data/bedtools-2.29.2+dfsg/src/tagBam/tagBamMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/unionBedGraphs/unionBedGraphs.cpp
Examining data/bedtools-2.29.2+dfsg/src/unionBedGraphs/unionBedGraphs.h
Examining data/bedtools-2.29.2+dfsg/src/unionBedGraphs/unionBedGraphsMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools-Ancillary/BamAncillary.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools-Ancillary/BamAncillary.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamAlignment.hpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamAlignment.mapping.hpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamAncillary.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamReader.hpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamWriter.hpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/SamHeader.hpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/api/BamAlignment.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/api/BamAux.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/api/BamMultiReader.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/api/BamReader.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/api/BamWriter.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/api/SamConstants.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BinTree/BinTree.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BinTree/BinTree.h
Examining data/bedtools-2.29.2+dfsg/src/utils/BlockedIntervals/BlockedIntervals.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/BlockedIntervals/BlockedIntervals.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextClosest.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextComplement.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextComplement.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextCoverage.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextCoverage.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextFisher.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextFisher.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextGroupBy.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextGroupBy.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextIntersect.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextIntersect.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextJaccard.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextJaccard.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextMap.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextMap.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextMerge.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextMerge.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSample.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSample.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSpacing.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSpacing.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSubtract.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSubtract.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSummary.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextSummary.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextClosest.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Fasta/LargeFileSupport.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Fasta/split.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/Fasta/split.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BamFileReader.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BamFileReader.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BufferedStreamMgr.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BufferedStreamMgr.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/FileReader.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/FileReader.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/SingleLineDelimTransferBuffer.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/SingleLineDelimTransferBuffer.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileRecordMergeMgr.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileRecordMergeMgr.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileRecordMgr.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileRecordMgr.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BamRecord.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BamRecord.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed12Interval.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed12Interval.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed3Interval.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed3Interval.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed4Interval.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed4Interval.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed5Interval.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed5Interval.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed6Interval.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Bed6Interval.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BedGraphInterval.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BedGraphInterval.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BedPlusInterval.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BedPlusInterval.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BlockMgr.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/BlockMgr.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/EmptyRecord.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/EmptyRecord.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/GffPlusRecord.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/GffPlusRecord.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/GffRecord.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/GffRecord.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/NoPosPlusRecord.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/NoPosPlusRecord.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/PlusFields.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/PlusFields.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Record.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/Record.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordKeyList.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordKeyList.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordKeyVector.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordKeyVector.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordList.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordList.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordMgr.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/RecordMgr.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/StrandQueue.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/StrandQueue.h
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/VcfRecord.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/Records/VcfRecord.h
Examining data/bedtools-2.29.2+dfsg/src/utils/GenomeFile/GenomeFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/GenomeFile/GenomeFile.h
Examining data/bedtools-2.29.2+dfsg/src/utils/GenomeFile/NewGenomeFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/GenomeFile/NewGenomeFile.h
Examining data/bedtools-2.29.2+dfsg/src/utils/KeyListOps/KeyListOps.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/KeyListOps/KeyListOps.h
Examining data/bedtools-2.29.2+dfsg/src/utils/KeyListOps/KeyListOpsMethods.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/KeyListOps/KeyListOpsMethods.h
Examining data/bedtools-2.29.2+dfsg/src/utils/NewChromsweep/CloseSweep.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/NewChromsweep/CloseSweep.h
Examining data/bedtools-2.29.2+dfsg/src/utils/NewChromsweep/NewChromsweep.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/NewChromsweep/NewChromsweep.h
Examining data/bedtools-2.29.2+dfsg/src/utils/Point/Point.h
Examining data/bedtools-2.29.2+dfsg/src/utils/RecordOutputMgr/RecordOutputMgr.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/RecordOutputMgr/RecordOutputMgr.h
Examining data/bedtools-2.29.2+dfsg/src/utils/ToolBase/ToolBase.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/ToolBase/ToolBase.h
Examining data/bedtools-2.29.2+dfsg/src/utils/VectorOps/VectorOps.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/VectorOps/VectorOps.h
Examining data/bedtools-2.29.2+dfsg/src/utils/bedFile/bedFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/bedFile/bedFile.h
Examining data/bedtools-2.29.2+dfsg/src/utils/bedFilePE/bedFilePE.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/bedFilePE/bedFilePE.h
Examining data/bedtools-2.29.2+dfsg/src/utils/bedGraphFile/bedGraphFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/bedGraphFile/bedGraphFile.h
Examining data/bedtools-2.29.2+dfsg/src/utils/chromsweep/chromsweep.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/chromsweep/chromsweep.h
Examining data/bedtools-2.29.2+dfsg/src/utils/driver/BedtoolsDriver.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/driver/BedtoolsDriver.h
Examining data/bedtools-2.29.2+dfsg/src/utils/fileType/FileRecordTypeChecker.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/fileType/FileRecordTypeChecker.h
Examining data/bedtools-2.29.2+dfsg/src/utils/fileType/fileType.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/fileType/fileType.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/BTlist.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/BedtoolsTypes.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/CommonHelp.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/general/CommonHelp.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/CompressionTools.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/general/CompressionTools.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/ErrorMsg.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/general/ErrorMsg.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/FreeList.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/InflateStreamBuf.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/ParseTools.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/general/ParseTools.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/PushBackStreamBuf.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/general/PushBackStreamBuf.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.h
Examining data/bedtools-2.29.2+dfsg/src/utils/general/Tokenizer.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/general/Tokenizer.h
Examining data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h
Examining data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.C
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/bcf_sr_sort.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/bcf_sr_sort.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_external.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_samtools.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_samtools.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_stats.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_stats.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/files.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/mFILE.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/mFILE.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/misc.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/os.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/pooled_alloc.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/pooled_alloc.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_byte.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/string_alloc.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/string_alloc.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/errmod.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/faidx.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_gcs.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_internal.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_net.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hts_internal.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/hts_os.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htsfile.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/bgzf.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/cram.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/faidx.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hfile.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_defs.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_endian.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_log.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_os.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kbitset.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kfunc.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/khash.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/khash_str2int.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/klist.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/knetfile.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kseq.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/ksort.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kstring.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/regidx.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/sam.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/synced_bcf_reader.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/tbx.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/thread_pool.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/vcf.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/vcf_sweep.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/vcfutils.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/kfunc.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/md5.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/multipart.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/os/lzma_stub.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/os/rand.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/plugin.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/probaln.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/realn.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/regidx.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/synced_bcf_reader.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/tbx.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/textutils.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/textutils_internal.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool_internal.h
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf_sweep.c
Examining data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c
Examining data/bedtools-2.29.2+dfsg/src/utils/lineFileUtilities/lineFileUtilities.h
Examining data/bedtools-2.29.2+dfsg/src/utils/sequenceUtilities/sequenceUtils.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/sequenceUtilities/sequenceUtils.h
Examining data/bedtools-2.29.2+dfsg/src/utils/stringUtilities/stringUtilities.h
Examining data/bedtools-2.29.2+dfsg/src/utils/tabFile/tabFile.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/tabFile/tabFile.h
Examining data/bedtools-2.29.2+dfsg/src/utils/version/version.cpp
Examining data/bedtools-2.29.2+dfsg/src/utils/version/version.h
Examining data/bedtools-2.29.2+dfsg/src/windowBed/windowBed.cpp
Examining data/bedtools-2.29.2+dfsg/src/windowBed/windowBed.h
Examining data/bedtools-2.29.2+dfsg/src/windowBed/windowMain.cpp
Examining data/bedtools-2.29.2+dfsg/src/windowMaker/windowMaker.cpp
Examining data/bedtools-2.29.2+dfsg/src/windowMaker/windowMaker.h
Examining data/bedtools-2.29.2+dfsg/src/windowMaker/windowMakerMain.cpp

FINAL RESULTS:

data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1989:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        chmod(path, mode);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1996:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    chmod(path, mode);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2243:22:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
            if (0 == chmod(path_tmp, 0444))
data/bedtools-2.29.2+dfsg/src/nucBed/nucBed.cpp:56:5:  [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("%" PRId_CHRPOS "\t%" PRId_CHRPOS "\t%" PRId_CHRPOS "\t%" PRId_CHRPOS "\t%" PRId_CHRPOS "\t%" PRId_CHRPOS "\t%" PRId_CHRPOS,a,c,g,t,n,other,seqLength);
data/bedtools-2.29.2+dfsg/src/nucBed/nucBed.cpp:62:9:  [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%" PRId_CHRPOS,userPatternCount);
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:303:6:  [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.
	if (system(genFileCmd.c_str()) != 0) { //expects successful calls to randomBed to return zero.
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:410:13:  [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 ret1 = system(cmd1.c_str());
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:416:13:  [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 ret2 = system(cmd2.c_str());
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:431:2:  [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.
	system(diffCmd.c_str());
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:472:13:  [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 ret1 = system(cmd1.c_str());
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:496:13:  [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 ret2 = system(cmd2.c_str());
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:564:6:  [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.
	if (system(psCmd.c_str()) != 0) {
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:585:6:  [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.
	if (system(killCmd.c_str()) != 0) {
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:633:4:  [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.
			sscanf(sLine, "%s %s %s %s %s", field1, field2, field3, field4, field5);
data/bedtools-2.29.2+dfsg/src/utils/Fasta/split.cpp:21: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(cstr, s.c_str());
data/bedtools-2.29.2+dfsg/src/utils/bedFile/bedFile.h:1058: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(out,"%s\t%" PRId_CHRPOS, bed.chrom.c_str(), start+1);
data/bedtools-2.29.2+dfsg/src/utils/bedFile/bedFile.h:1232: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%" PRId_CHRPOS, bed.chrom.c_str(), bed.start+1);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:51: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/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:184:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(name, argv[optind]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:89: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.
#define RP(...) fprintf (stderr, __VA_ARGS__)
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1595: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(fai_file, R_OK) != 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1928: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(path, fn);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1962: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/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1970: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, fn);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/misc.h:94:60:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#    define __PRINTF_FORMAT__(a,b) __attribute__ ((format (printf, a, b)))
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:181:26:  [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).
            cp += strlen(strcpy(cp, file));
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:232:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "%s", file);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:254:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(path_end, file);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:266:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(path_end, file);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:371: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(relative_path, relative_to);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/os.h:198:9:  [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.
#define popen _popen
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c:249:41:  [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.
                       curl_lock_access access, void *userptr) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1725: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(fnidx, fn);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2852: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(fnidx, fn); strcpy(fnidx + l_fn, ext);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2852:24:  [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(fnidx, fn); strcpy(fnidx + l_fn, ext);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2858: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(fnidx + i, ext);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2984: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, argptr);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htsfile.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, args);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_defs.h:87:24:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define HTS_PRINTF_FMT printf
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:322:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fp->retr, "RETR %s\r\n", p);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:324:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fp->size_cmd, "SIZE %s\r\n", p);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:421:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	l += sprintf(buf + l, "GET %s HTTP/1.0\r\nHost: %s\r\n", fp->path, fp->http_host);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:154:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	l = vsnprintf(s->s + s->l, s->m - s->l, fmt, args); // This line does not work with glibc 2.0. See `man snprintf'.
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:160:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		l = vsnprintf(s->s + s->l, s->m - s->l, fmt, args);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2102: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(mode_opts, mode ? mode : "r");
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2146: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(cp, opts);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.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(stderr, format, ap);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.c:506: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(strcpy(idx_fname, fname), suffix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.c:506: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(idx_fname, fname), suffix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:59:12:  [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.
    return vfprintf(fp, fmt, args);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:780: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/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:785: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(line, n, fmt, ap);
data/bedtools-2.29.2+dfsg/src/randomBed/randomBed.cpp:28:9:  [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(seed);
data/bedtools-2.29.2+dfsg/src/randomBed/randomBed.cpp:33:9:  [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(_seed);
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:80: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.
	_userName = getenv("USER");
data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBed.cpp:53:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(_seed);
data/bedtools-2.29.2+dfsg/src/split/splitBed.cpp:91:17:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        int c = getopt_long (argc, argv, "vhp:i:n:a:",
data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamReader.hpp:181:22:  [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* ref_file = getenv("CRAM_REFERENCE");
data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamWriter.hpp:20:27:  [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* ref_file = getenv("CRAM_REFERENCE");
data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.cpp:385:2:  [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(_seed);
data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.cpp:484:2:  [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(_seed);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:123: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, "cdh?fb:@:s:iI:l:grt",loptions,NULL)) >= 0){
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2009:12:  [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.
    base = getenv("XDG_CACHE_HOME");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2012:12:  [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.
    base = getenv("HOME");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2015:12:  [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.
    base = getenv("TMPDIR");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2018:12:  [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.
    base = getenv("TEMP");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2045:22:  [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 *ref_path = getenv("REF_PATH");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2050:25:  [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 *local_cache = getenv("REF_CACHE");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:322:16:  [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.
        path = getenv("RAWDATA");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:397:16:  [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.
        path = getenv("RAWDATA");
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.c:808: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, "o:d")) != -1) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_gcs.c:76:20:  [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.
    access_token = getenv("GCS_OAUTH_TOKEN");
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c:1152:36:  [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* env_curl_ca_bundle = getenv("CURL_CA_BUNDLE");
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c:1366: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.
    if ((auth = getenv("HTS_AUTH_LOCATION")) != NULL) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c:1379: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.
    if ((auth = getenv("HTS_ALLOW_UNENCRYPTED_AUTHORIZATION_HEADER")) != NULL
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:154:28:  [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 *home = getenv("HOME");
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:358: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.
        if ((v = getenv("AWS_ACCESS_KEY_ID")) != NULL) kputs(v, &ad->id);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:359: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.
        if ((v = getenv("AWS_SECRET_ACCESS_KEY")) != NULL) kputs(v, &ad->secret);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:360: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.
        if ((v = getenv("AWS_SESSION_TOKEN")) != NULL) kputs(v, &ad->token);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:362: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.
        if ((v = getenv("AWS_DEFAULT_PROFILE")) != NULL) kputs(v, &profile);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:363:23:  [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.
        else if ((v = getenv("AWS_PROFILE")) != NULL) kputs(v, &profile);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:368:25:  [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 *v = getenv("AWS_SHARED_CREDENTIALS_FILE");
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts_os.c:34:54:  [3] (random) erand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
double hts_erand48(unsigned short xseed[3]) { return erand48(xseed); }
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts_os.c:35:35:  [3] (random) drand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
double hts_drand48(void) { return drand48(); }
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts_os.c:36:35:  [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.
double hts_lrand48(void) { return lrand48(); }
data/bedtools-2.29.2+dfsg/src/utils/htslib/htsfile.c:200: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, "chHv?", options, NULL)) >= 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_os.h:37:9:  [3] (random) erand48:
  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 erand48(X) hts_erand48((X))
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_os.h:38:9:  [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.
#define drand48() hts_drand48()
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_os.h:39:9:  [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.
#define lrand48() hts_lrand48()
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_os.h:55: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/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_os.h:55: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/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts_os.h:56: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/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:395:10:  [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.
	proxy = getenv("http_proxy");
data/bedtools-2.29.2+dfsg/src/utils/htslib/plugin.c:84:16:  [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.
        path = getenv("HTS_PATH");
data/bedtools-2.29.2+dfsg/src/utils/htslib/probaln.c:285: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, "b:q:")) >= 0) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.c:398: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, "hH?0b:c:e:fm:p:s:S:lr:CR:T:", loptions,NULL)) >= 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1010:12:  [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.
    usleep(random() % 100000); // to coerce job completion out of order
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1051:38:  [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.
    usleep(500000 * ((job&31)==31) + random() % 10000);
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1248:12:  [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.
    usleep(random() % 10000); // fast job
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1274:12:  [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.
    usleep(random() % 100000); // slow job
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1299:12:  [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.
    usleep(random() % 10000); // fast job
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1355: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(0);
data/bedtools-2.29.2+dfsg/src/bedToBam/bedToBam.cpp:96: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).
                mapQual = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/bedToBam/bedToBam.cpp:254: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).
            unsigned int blockCount = atoi(bed.fields[9].c_str());
data/bedtools-2.29.2+dfsg/src/bedToIgv/bedToIgv.cpp:104:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                slop = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/bedpeToBam/bedpeToBam.cpp: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).
                mapQual = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/clusterBed/clusterMain.cpp: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).
                maxDistance = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/fastaFromBed/fastaFromBed.cpp:125:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fr->open(_dbFile, memmap, _useFullHeader);
data/bedtools-2.29.2+dfsg/src/genomeCoverageBed/genomeCoverageMain.cpp:115: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).
                max = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/genomeCoverageBed/genomeCoverageMain.cpp:156: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).
                fragmentSize = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/getOverlap/getOverlap.cpp:99:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            s1 = atoi(posColumns[0].c_str());
data/bedtools-2.29.2+dfsg/src/getOverlap/getOverlap.cpp:100:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            e1 = atoi(posColumns[1].c_str());
data/bedtools-2.29.2+dfsg/src/getOverlap/getOverlap.cpp:101:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            s2 = atoi(posColumns[2].c_str());
data/bedtools-2.29.2+dfsg/src/getOverlap/getOverlap.cpp:102:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            e2 = atoi(posColumns[3].c_str());
data/bedtools-2.29.2+dfsg/src/multiBamCov/multiBamCovMain.cpp:105: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).
                minQual = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/nekSandbox1/nekSandboxMain.cpp:300:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	frm.open();
data/bedtools-2.29.2+dfsg/src/nekSandbox1/nekSandboxMain.cpp:335: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 myBuf[10];
data/bedtools-2.29.2+dfsg/src/nucBed/nucBed.cpp:113:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fr.open(_dbFile, memmap, _useFullHeader);
data/bedtools-2.29.2+dfsg/src/pairToPair/pairToPairMain.cpp:99:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                slop = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/randomBed/randomBedMain.cpp:68:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                seed = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/randomBed/randomBedMain.cpp:80: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).
                numToGenerate = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:186: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).
	_configFile.open(_configFilename.c_str());
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:212: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).
			numLinesToRead = atoi(field2.c_str());
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:464: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 timeBuf[100]; //be sure to initialize before use.
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:570: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).
	FILE *fp = fopen(pidFilename.c_str(), "r");
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:571: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 sLine[4192];
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:596: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).
	FILE *fp = fopen(_memoryLogfilename.c_str(), "r");
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:602: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 sLine[4192];
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:604: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 field1[2048];
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:605: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 field2[2048];
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:606: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 field3[2048];
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:607: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 field4[2048];
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:608: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 field5[2048];
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:636:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			currMem = atoi(field5);
data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBedMain.cpp:99:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                seed = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBedMain.cpp:118: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).
                maxTries = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/split/splitBed.cpp:103: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).
            case 'n': num_chuncks = (unsigned int)atoi(optarg); break;
data/bedtools-2.29.2+dfsg/src/split/splitBed.cpp:153:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* out = fopen(filename.c_str(),"w");
data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamAlignment.hpp:192:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(qname_buf, Name.c_str(), Name.size() + 1);
data/bedtools-2.29.2+dfsg/src/utils/BlockedIntervals/BlockedIntervals.cpp:78:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int blockCount = atoi(bed.fields[9].c_str());
data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.cpp:348:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (!frm->open(_inheader)) {
data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.cpp:449:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	setNumOutputRecords(atoi(_argv[_i + 1]));
data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.cpp:483:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	_seed  = atoi(_argv[_i+1]);
data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextBase.cpp:553:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    	int prec = atoi(_argv[_i + 1]);
data/bedtools-2.29.2+dfsg/src/utils/Contexts/ContextClosest.cpp:258: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).
			_numClosestHitsWanted = atoi(_argv[_i+1]);
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp:54:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    indexFile.open(fname.c_str(), ifstream::in);
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp:122:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    refFile.open(refname.c_str());
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp:204:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file.open(fname.c_str()); 
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp:237:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
void FastaReference::open(string reffilename, bool usemmap, bool useFullHeader) {
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp:239:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(file = fopen(filename.c_str(), "r"))) {
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp:289: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(seq, (char*) filemm + entry.offset, seqlen);
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.cpp:331: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(seq, (char*) filemm + entry.offset + newlines_before + start, seqlen);
data/bedtools-2.29.2+dfsg/src/utils/Fasta/Fasta.h:65: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).
        void open(string reffilename, bool usemmap = false,
data/bedtools-2.29.2+dfsg/src/utils/Fasta/split.cpp:19:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cchars [s.size()+1];
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BamFileReader.cpp:16:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool BamFileReader::open()
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BamFileReader.h:20:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	virtual bool open(); //open the file
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BufferedStreamMgr.cpp:63:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(_mainBuf, _currScanBuffer.c_str(), _currScanBuffer.size());
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/FileReader.cpp:17:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool FileReader::open() {
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/FileReader.h:27:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	virtual bool open(); //open the file
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:106:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(data, _saveDataStr.c_str(), origRead);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:113:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(data, _saveDataStr.c_str(), dataSize);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:140: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 cram_code[4];
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/SingleLineDelimTransferBuffer.cpp:13:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	_fields = new char *[_numFields];
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/SingleLineDelimTransferBuffer.cpp:44:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(_fields[fieldNum], oldCursor, newCursor - oldCursor);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileRecordMgr.cpp:42:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool FileRecordMgr::open(bool inheader){
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileRecordMgr.cpp:88:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!_fileReader->open()) {
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileRecordMgr.h:35:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	bool open(bool inheader=false);
data/bedtools-2.29.2+dfsg/src/utils/GenomeFile/GenomeFile.cpp:67:49:  [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).
                        CHRPOS size           = atol(genomeFields[1].c_str());
data/bedtools-2.29.2+dfsg/src/utils/bedFile/bedFile.h:594: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).
                        int numExons = atoi(fields[9].c_str());
data/bedtools-2.29.2+dfsg/src/utils/general/InflateStreamBuf.h:107:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy((void*)&buffer[total], &buffout[0], sizeof(char)*have);
data/bedtools-2.29.2+dfsg/src/utils/general/InflateStreamBuf.h:119:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 buffin[GZBUFSIZ];
data/bedtools-2.29.2+dfsg/src/utils/general/InflateStreamBuf.h:120:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 buffout[GZBUFSIZ];
data/bedtools-2.29.2+dfsg/src/utils/general/ParseTools.h:51: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 tmp[12];
data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp:49: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 buffer[2];
data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp:236:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(_buffer, inBuf, newLen);
data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp:268:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(_buffer + _currSize, inBuf, inBufLen);
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.C:45:27:  [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).
gzstreambuf* gzstreambuf::open( const char* name, int open_mode) {
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.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  fmode[10];
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.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( buffer + (4 - n_putback), gptr() - n_putback, n_putback);
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.C:142:5:  [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).
    open( name, mode);
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.C:149:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
void gzstreambase::open( const char* name, int open_mode) {
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.C:150:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ( ! buf.open( name, open_mode))
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h: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             buffer[bufferSize]; // data buffer
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h:65:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    gzstreambuf* open( const char* name, int open_mode);
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h:81:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open( const char* name, int open_mode);
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h:98:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open( const char* name, int open_mode = std::ios::in) {
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h:99:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        gzstreambase::open( name, open_mode);
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h:109:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open( const char* name, int open_mode = std::ios::out) {
data/bedtools-2.29.2+dfsg/src/utils/gzstream/gzstream.h:110:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        gzstreambase::open( name, open_mode);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bcf_sr_sort.c:326: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, srt->charp[i], len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.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.
    unsigned char comp_data[BGZF_MAX_BLOCK_SIZE];
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.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.
    unsigned char uncomp_data[BGZF_MAX_BLOCK_SIZE];
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:178: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 buffer[32];
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:372: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, "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0", 28);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:385: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 + BLOCK_HEADER_LENGTH+5, src, slen);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:412: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, g_magic, BLOCK_HEADER_LENGTH); // the last two bytes are a place holder for the length of the block
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:436: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 + BLOCK_HEADER_LENGTH+5, src, slen);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:463: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, g_magic, BLOCK_HEADER_LENGTH); // the last two bytes are a place holder for the length of the block
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:663: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(fp->uncompressed_block, p->block, p->size);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:717:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->block, fp->uncompressed_block, p->size);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:888: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(cblock, header, sizeof(header));
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.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(compressed_block, header, BLOCK_HEADER_LENGTH);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:998: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(output, buffer + fp->block_offset, copy_length);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1048: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(j->comp_data, g_magic, BLOCK_HEADER_LENGTH);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1196: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(compressed_block, header, BLOCK_HEADER_LENGTH);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1462: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(j->comp_data + BLOCK_HEADER_LENGTH + 5, fp->uncompressed_block,
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1466: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(j->uncomp_data, fp->uncompressed_block, j->uncomp_len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1572:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer + fp->block_offset, input, copy_length);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1598:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer + fp->block_offset, input, copy_length);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1802: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(str->s + str->l, buf + fp->block_offset, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:127:27:  [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 'b': start = atol(optarg); compress = 0; pstdout = 1; break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:128:26:  [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': size = atol(optarg); pstdout = 1; break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:132:36:  [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 'l': compress_level = atol(optarg); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:135: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 '@': threads = atoi(optarg); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:154: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 out_mode[3] = "w\0";
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:155: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 out_mode_exclusive[4] = "wx\0";
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:174:26:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if ((f_src = open(argv[optind], O_RDONLY)) < 0) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:185:17:  [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(name, ".gz");
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:317:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                f_dst = open(name, is_forced? wrflags : wrflags|O_EXCL, 0666);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:319:29:  [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).
                    f_dst = open(name, wrflags, 0666);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:145: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(&block->data[block->byte], bytes, len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:350: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, cp, *out_size);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:437: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[99], *tp = tmp;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:1731: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[20], *cp = buf;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.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(hdr->substitution_matrix, "CGTNAGTNACTNACGNACGT", 20);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:1147: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(hdr->md5, cp, 16);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:1299: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(&seq[seq_pos-1],
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:1329: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(&seq[seq_pos-1], &s->ref[ref_pos - s->ref_start +1],
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:1778: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(&seq[seq_pos-1],
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:1809: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(&seq[seq_pos-1], &s->ref[ref_pos - s->ref_start +1],
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:1898:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[7];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:1951: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 tag_data[3];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2014: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 tag_data[3];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2328: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 digest[16];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2368: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 M[33];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2847: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 name_a[1024], *name;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2860: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(name, fd->prefix, name_len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2923: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(aux, BLOCK_DATA(s->aux_blk) + cr->aux, cr->aux_size);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2931: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(aux, bfd->rg[cr->rg].name, len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:203: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 smat[5], *mp = smat;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.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(cp, s->hdr->md5, 16); cp += 16;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:1657: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(h->substitution_matrix, CRAM_SUBST_MATRIX, 20);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2018:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            uint32_t count = (uint32_t)((((unsigned char *)aux)[4]<< 0) +
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2019:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)aux)[5]<< 8) +
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2020:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)aux)[6]<<16) +
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2021:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)aux)[7]<<24));
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2047: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(tmp, aux, blen); tmp += blen; aux += blen;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2326:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            uint32_t count = (uint32_t)((((unsigned char *)aux)[4]<< 0) +
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2327:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)aux)[5]<< 8) +
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2328:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)aux)[6]<<16) +
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2329:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)aux)[7]<<24));
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_encode.c:2858: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(to, from, cr->len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.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 buf[65536];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:537: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/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:551:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buf, "%d\t%d\t%d\t%"PRId64"\t%d\t%d\n",
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:564:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "%d\t%d\t%d\t%"PRId64"\t%d\t%d\n",
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:629: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[1024];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:647:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(buf, "%d\t%d\t%d\t%"PRId64"\t%d\t%d\n",
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:196: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 c[5];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:255: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/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:374: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 c[9];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:473: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/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:526: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 cp[4];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:853: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 dat[100], *cp = dat;;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:896: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 dat[100], *cp = dat;;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1592: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 fai_file[PATH_MAX];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1626: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 fai_fn[PATH_MAX];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1627: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[8192];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1660: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(fai_fn, "%.*s.fai", PATH_MAX-5, r->fn);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1667: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).
    if (!(fp = fopen(fai_fn, "r"))) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2048: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[PATH_MAX], path_tmp[PATH_MAX + 64];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2049: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 cache[PATH_MAX], cache_root[PATH_MAX];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2217: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 unsigned md5_buf1[16];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2218: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 md5_buf2[33];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3016: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_a[1024], *buf = buf_a;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3688: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(header, BLOCK_END(b), header_len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3753:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(out+len, "/%.*s", PATH_MAX - len, in);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3795: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 unsigned buf[16];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3796: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 buf2[33];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3822: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 ref_fn[PATH_MAX];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:4056: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 fmode[3]= { mode[0], '\0', '\0' };
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:4206: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[65536];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:4595:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char TEMPLATE_2_1[30] = {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:4600:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const unsigned char TEMPLATE_3[38] = {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:4607: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 buf[38]; // max(sizeof TEMPLATE_*)
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.h:531: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(BLOCK_END((b)), (s), (l)); \
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_samtools.c:57: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 L[256] = {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_samtools.c:113: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.
    if (ncigar > 0) memcpy(cp, cigar, ncigar*4);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_samtools.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(cp, qual, len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_samtools.c:136: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(header->text, ks_str(&h->text), header->l_text);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h: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    magic[4];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h:186: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    file_id[20];      // Filename or SHA1 checksum
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h: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 substitution_matrix[5][4];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h:348: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 md5[16];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h:734: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 L1[256];              // ACGT{*} ->0123{4}
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h:735: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 L2[256];              // ACGTN{*}->01234{5}
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_structs.h:736: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 cram_sub_matrix[32][32];       // base substituion codes
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/mFILE.c:337: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 (NULL == (fp = fopen(path, mode)))
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/mFILE.c:504: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(cptr, &mf->data[mf->offset], len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/mFILE.c:536: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(&mf->data[mf->offset], ptr, size * nmemb);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:172: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[8192], *cp;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:370: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 relative_path[PATH_MAX+1];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.c:203: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 R[TOTFREQ];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.c:799: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 in_buf[BLK_SIZE2+257*257*3];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.c:811: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).
            order = atoi(optarg);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.c:823: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).
        if (!(infp = fopen(argv[optind], "rb"))) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/rANS_static.c:831: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 (!(outfp = fopen(argv[optind], "wb"))) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:55: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 c[2];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:125: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).
                sh->ref[nref].len = atoi(tag->str+3);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:827: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 c[2];
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:1167:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(sh->ID_buf, "%.1000s.%d", name, sh->ID_cnt++);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:1201: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(end, sh->pg_end, nends * sizeof(*end));
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.h: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 ID_buf[1024];  // temporary buffer
data/bedtools-2.29.2+dfsg/src/utils/htslib/faidx.c:159:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                        char s[4] = { '"', c, '"', '\0' };
data/bedtools-2.29.2+dfsg/src/utils/htslib/faidx.c:327: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[96]; // Must be big enough for format below.
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:244: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(buffer + copied, fp->begin, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:251:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer + copied, fp->begin, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:289: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(buffer, fp->begin, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:329: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(dest, fp->begin, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:395: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(fp->begin, src, remaining);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:687: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(filename, hfile_oflags(mode), 0666);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:1083: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 scheme[12];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:1111:29:  [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).
            return handler->open(fname, mode);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_internal.h:111: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).
    hFILE *(*open)(const char *filename, const char *mode) HTS_RESULT_USED;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c:484:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[16];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c:725: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(fp->buffer.ptr.rd, ptr, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_libcurl.c:806: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(ptr, fp->buffer.ptr.wr, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:47:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char date[40];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:49:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *headers[3];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:89: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[3];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:160:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(full_fname.s, mode);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:164:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(fname, mode);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:266: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[DIGEST_BUFSIZ];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_s3.c:313: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 *header_list[4], **header = header_list;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:62:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char seq_nt16_table[256] = {
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:132: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 buffer[512];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:200: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 s[32];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.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 smode[102], *cp, *cp2, *mode_c;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:513: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).
        o->opt = CRAM_OPT_DECODE_MD, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:517: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).
        o->opt = CRAM_OPT_VERBOSITY, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:521:54:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_SEQS_PER_SLICE, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:525:55:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_BASES_PER_SLICE, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:529:60:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_SLICES_PER_CONTAINER, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:533: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).
        o->opt = CRAM_OPT_EMBED_REF, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:537: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).
        o->opt = CRAM_OPT_NO_REF, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:541: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).
        o->opt = CRAM_OPT_IGNORE_MD5, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:545: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).
        o->opt = CRAM_OPT_USE_BZIP2, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:549:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_USE_RANS, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:553:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_USE_LZMA, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:565:59:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_MULTI_SEQ_PER_SLICE, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:569:47:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = HTS_OPT_NTHREADS, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:605:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_STORE_MD, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:609:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        o->opt = CRAM_OPT_STORE_NM, o->val.i = atoi(val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:696: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 arg[8001];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:730: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 fmt[8];
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:802: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 simple_mode[101], *cp, *opts;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1471: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(q->list + q->n, p->list, p->n * sizeof(hts_pair64_t));
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1727:23:  [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.
    case HTS_FMT_BAI: strcat(fnidx, ".bai"); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1728:23:  [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.
    case HTS_FMT_CSI: strcat(fnidx, ".csi"); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1729:23:  [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.
    case HTS_FMT_TBI: strcat(fnidx, ".tbi"); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1868: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(idx->meta, &x[1*4], 28);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1906: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(new_meta, meta, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2565: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_a[1024], *tmp = tmp_a;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2790:25:  [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 ((local_fp = fopen((char*)p, "rb")) != 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2798:25:  [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 ((local_fp = fopen(p, "w")) == 0) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hfile.h: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(buffer, fp->begin, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hfile.h: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(fp->begin, text, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hfile.h:274:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(fp->begin, buffer, n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hts.h:313:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const unsigned char seq_nt16_table[256];
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kseq.h:138:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(str->s + str->l, ks->buf + ks->begin, i - ks->begin);  \
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kstring.h:149:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->s + s->l, p, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kstring.h:181:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->s + s->l, p, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kstring.h:188:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16];
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kstring.h:203:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16];
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kstring.h:217:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[32];
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/sam.h:409:45:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
uint8_t *bam_aux_get(const bam1_t *b, const char tag[2]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/sam.h:480:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_append(bam1_t *b, const char tag[2], char type, int len, const uint8_t *data);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/sam.h:509:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_str(bam1_t *b, const char tag[2], int len, const char *data);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/sam.h:532:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_int(bam1_t *b, const char tag[2], int64_t val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/sam.h:551:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_float(bam1_t *b, const char tag[2], float val);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/sam.h:589:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_array(bam1_t *b, const char tag[2],
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:185: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).
	server.sin_port = htons(atoi(port));
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:260:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ftp->pasv_ip, v, 4 * sizeof(int));
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:268: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 host[80], port[10];
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:273: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(host, "%d.%d.%d.%d", ftp->pasv_ip[0], ftp->pasv_ip[1], ftp->pasv_ip[2], ftp->pasv_ip[3]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:274: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(port, "%d", ftp->pasv_port);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:351:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char tmp[32];
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:353:3:  [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(tmp, "REST %lld\r\n", (long long)fp->offset);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:355:3:  [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(tmp, "REST ");
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:357:3:  [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, "\r\n");
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:422:28:  [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 (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:423:7:  [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.
	l += sprintf(buf + l, "\r\n");
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:497:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open(fn, O_RDONLY | O_BINARY);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:499:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open(fn, O_RDONLY);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:38:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[21], *cp = buf+20, *ep;
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:58:12:  [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.
		int s2 = sprintf(s->s + s->l, "%g", d);
data/bedtools-2.29.2+dfsg/src/utils/htslib/md5.c:65:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 buffer[64];
data/bedtools-2.29.2+dfsg/src/utils/htslib/md5.c:252:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&ctx->buffer[used], data, size);
data/bedtools-2.29.2+dfsg/src/utils/htslib/md5.c:256: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(&ctx->buffer[used], data, available);
data/bedtools-2.29.2+dfsg/src/utils/htslib/md5.c:267:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ctx->buffer, data, size);
data/bedtools-2.29.2+dfsg/src/utils/htslib/probaln.c:287: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).
        case 'b': b = atoi(optarg); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/probaln.c:288: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).
        case 'q': q = atoi(optarg); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/realn.c:205: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(bq, qual, c->l_qseq); bq[c->l_qseq] = 0;
data/bedtools-2.29.2+dfsg/src/utils/htslib/regidx.c:151: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->payload + idx->payload_size*(list->nregs-1), idx->payload, idx->payload_size);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:89:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(h->text, h0->text, h->l_text);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:123: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[4];
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:345: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(data, bsrc->data, bsrc->l_data); // copy var-len data
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:424: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 + cigar_st, b->data + (n_cigar4 - fake_bytes) + CG_st + 8, n_cigar4); // copy the real CIGAR to the right place; -fake_bytes for the fake CIGAR
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1043:23:  [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).
                kputl(atol(tab), &str);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1132: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[5] = { '\t', key[0], key[0] ? key[1] : '\0', ':', '\0' };
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1652: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(out, in, len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1659: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(&v, in + i, sizeof(type_t));                         \
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1673: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(&n, in + 1, 4);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1689:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_append(bam1_t *b, const char tag[2], char type, int len, const uint8_t *data)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1704: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 + b->l_data + 3, data, len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1747:45:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
uint8_t *bam_aux_get(const bam1_t *b, const char tag[2])
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1798:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_str(bam1_t *b, const char tag[2], int len, const char *data)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1833:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_int(bam1_t *b, const char tag[2], int64_t val)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1887:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(s, &val, sz);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1899:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_float(bam1_t *b, const char tag[2], float val)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1935:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int bam_aux_update_array(bam1_t *b, const char tag[2],
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1983:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(s + 6, data, new_sz);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2133:9:  [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(cp, ",VERSION=2.1");
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2137:9:  [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(cp, ",VERSION=3.0");
data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.c:301: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).
        FILE *hdr  = fopen(header,"r");
data/bedtools-2.29.2+dfsg/src/utils/htslib/tbx.c:189:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(x, &tbx->conf, 24);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tbx.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(meta, x, 28);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tbx.c:204: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(meta + l, name[i], x);
data/bedtools-2.29.2+dfsg/src/utils/htslib/textutils.c:181: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[8];
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1367:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    n = atoi(argv[2]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:61:16:  [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.
    case '\n': strcpy(buffer, "\\n"); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:62:16:  [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.
    case '\r': strcpy(buffer, "\\r"); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:63:16:  [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.
    case '\t': strcpy(buffer, "\\t"); break;
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:67:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buffer, "\\%c", c);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:70:27:  [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 (isprint_c(c)) sprintf(buffer, "%c", c);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:71:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        else sprintf(buffer, "\\x%02X", (unsigned char) c);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:237:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hrec->keys[n-1],str,len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:250: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(&hrec->vals[i][1],str,len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:257: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(hrec->vals[i],str,len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:301: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(hrec->key,p,n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:309: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(hrec->value, p, q-p);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1026: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(v, x + 2, 16);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1086:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *types[9] = {
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1483: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->shared.s,src->shared.s,dst->shared.l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1491: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->indiv.s,src->indiv.s,dst->indiv.l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1529:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(x + 2, v, 16);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1570:48:  [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).
                kputs(",length=", &txt); kputl(atol(tab), &txt);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:2083:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buffer[8];
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:2208:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            v->pos = atoi(p) - 1;
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3348: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, str.s, str.l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3488: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, str.s, str.l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3734: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,info->vptr,info->len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3803:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tmp,src,fmt->n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3838: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,fmt->p,n);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf_sweep.c:80: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(sw->lals, rec->d.allele[0], len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:434:44:  [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 ( is_vector_end ) { memcpy(dat+k*size, dat+j*size, size); break; } \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:436: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.
                    if ( j!=k ) memcpy(dat+k*size, dat+j*size, size); \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:467:48:  [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 ( is_vector_end ) { memcpy(dat+l_new*size, dat+l_ori*size, size); break; } \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:469:45:  [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 ( l_ori!=l_new ) memcpy(dat+l_new*size, dat+l_ori*size, size); \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:738:48:  [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 ( is_vector_end ) { memcpy(ptr_dst+k_dst, ptr_src+k_src, size); break; } \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:740: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(ptr_dst+k_dst, ptr_src+k_src, size); \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:777:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                            memcpy(ptr_dst+k_dst, ptr_src+k_src, size); \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:780: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(ptr_dst+k_dst, ptr_src+k_src, size); \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:790:56:  [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 ( is_vector_end ) { memcpy(ptr_dst+k_dst, ptr_src+k_src, size); ia = nR_ori; break; }  \
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcfutils.c:792: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.
                                memcpy(ptr_dst+k_dst, ptr_src+k_src, size); \
data/bedtools-2.29.2+dfsg/src/utils/lineFileUtilities/lineFileUtilities.h:61: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).
        elems.push_back(atoi(item.c_str()));  
data/bedtools-2.29.2+dfsg/src/windowBed/windowMain.cpp:121: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).
                leftSlop = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/windowBed/windowMain.cpp:129: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).
                leftSlop = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/windowBed/windowMain.cpp:136: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).
                rightSlop = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/windowMaker/windowMakerMain.cpp:84:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                size = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/windowMaker/windowMakerMain.cpp:90:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                step = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/windowMaker/windowMakerMain.cpp:98: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).
                count = atoi(argv[i + 1]);
data/bedtools-2.29.2+dfsg/src/annotateBed/annotateMain.cpp:51: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/annotateBed/annotateMain.cpp:64: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bamToBed/bamToBed.cpp:99: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bamToBed/bamToBed.cpp:112: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bamToFastq/bamToFastqMain.cpp:52: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bamToFastq/bamToFastqMain.cpp:66: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bed12ToBed6/bed12ToBed6.cpp:49: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bed12ToBed6/bed12ToBed6.cpp:62: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bedToBam/bedToBam.cpp:65: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bedToBam/bedToBam.cpp:78: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bedToIgv/bedToIgv.cpp:57: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bedToIgv/bedToIgv.cpp:70: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bedpeToBam/bedpeToBam.cpp:66: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/bedpeToBam/bedpeToBam.cpp:79: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/clusterBed/clusterMain.cpp:42: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/clusterBed/clusterMain.cpp:55: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/expand/expand.cpp:39: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).
#define LOOKS_LIKE_A_PARAM(string) (strlen(string)>0 && string[0]=='-')
data/bedtools-2.29.2+dfsg/src/expand/expand.cpp:61: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/expand/expand.cpp:74: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/fastaFromBed/fastaFromBedMain.cpp:56: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/fastaFromBed/fastaFromBedMain.cpp:69: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/flankBed/flankBedMain.cpp:49: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/flankBed/flankBedMain.cpp:62: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/genomeCoverageBed/genomeCoverageMain.cpp:63: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/genomeCoverageBed/genomeCoverageMain.cpp:76: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/getOverlap/getOverlap.cpp:48: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/getOverlap/getOverlap.cpp:61: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/linksBed/linksMain.cpp:42: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/linksBed/linksMain.cpp:55: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/maskFastaFromBed/maskFastaFromBedMain.cpp:51: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/maskFastaFromBed/maskFastaFromBedMain.cpp:64: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/multiBamCov/multiBamCovMain.cpp:54: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/multiBamCov/multiBamCovMain.cpp:67: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/multiIntersectBed/multiIntersectBedMain.cpp:64: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/multiIntersectBed/multiIntersectBedMain.cpp:80: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/nucBed/nucBedMain.cpp:50: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/nucBed/nucBedMain.cpp:63: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/pairToBed/pairToBedMain.cpp:55: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/pairToBed/pairToBedMain.cpp:68: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/pairToPair/pairToPairMain.cpp:53: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/pairToPair/pairToPairMain.cpp:66: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/randomBed/randomBedMain.cpp:43: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/randomBed/randomBedMain.cpp:56: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/regressTest/RegressTest.cpp:623: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 len = strlen(sLine);
data/bedtools-2.29.2+dfsg/src/reldist/reldistMain.cpp:45: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/reldist/reldistMain.cpp:58: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/shiftBed/shiftBedMain.cpp:46: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/shiftBed/shiftBedMain.cpp:59: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBedMain.cpp:54: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/shuffleBed/shuffleBedMain.cpp:67: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/slopBed/slopBedMain.cpp:49: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/slopBed/slopBedMain.cpp:62: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/sortBed/sortMain.cpp:48: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/sortBed/sortMain.cpp:61: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/tagBam/tagBamMain.cpp:57: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/tagBam/tagBamMain.cpp:70: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/unionBedGraphs/unionBedGraphsMain.cpp:64: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/unionBedGraphs/unionBedGraphsMain.cpp:80: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamReader.hpp:20:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		static ssize_t read(void* data, void* resbuf, size_t sz)
data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamReader.hpp:23:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			stream_data->stream.read((char*)resbuf, sz);
data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/BamReader.hpp:237:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ops.read = stream_data_t::read;
data/bedtools-2.29.2+dfsg/src/utils/BamTools/include/SamHeader.hpp:71:45:  [1] (buffer) strlen:
  Does not handle 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 = _header->text == NULL ? 0 : strlen(_header->text);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/BufferedStreamMgr.cpp:146:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		_mainBufCurrLen = _inputStreamMgr->read((char *)_mainBuf, _useBufSize);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:75:55:  [1] (buffer) strlen:
  Does not handle 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 (strncmp(_filename.c_str(), FIFO_STRING_LITERAL, strlen(FIFO_STRING_LITERAL)) == 0) {
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:97:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int InputStreamMgr::read(char *data, size_t dataSize)
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:130:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	_finalInputStream->read(data, dataSize);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:257:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				ops.read = BamTools::stream_data_t::read;
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp:297:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	size_t numCharsRead = read(_tmpZipBuf, (size_t)SCAN_BUFFER_SIZE);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/InputStreamMgr.h:27:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read(char *data, size_t dataSize);
data/bedtools-2.29.2+dfsg/src/utils/FileRecordTools/FileReaders/SingleLineDelimTransferBuffer.cpp:33:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(inBuffer) == 0) {
data/bedtools-2.29.2+dfsg/src/utils/general/InflateStreamBuf.h:66:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		in->read((char*)buffin, GZBUFSIZ);
data/bedtools-2.29.2+dfsg/src/utils/general/ParseTools.cpp:45:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		ulen = strlen(str);
data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp:27: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).
	size_t len = strlen(inBuf);
data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp:77: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).
	set(inBuf, strlen(inBuf));
data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp:147: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).
	append(inBuf, strlen(inBuf));
data/bedtools-2.29.2+dfsg/src/utils/general/QuickString.cpp:210: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).
	size_t inLen = strlen(str);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bcf_sr_sort.c:121: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).
    int alen = strlen(avar->str);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bcf_sr_sort.c:122: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).
    int blen = strlen(bvar->str);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bcf_sr_sort.c:325: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(srt->charp[i]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1488:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(10000); // FIXME: replace by condition variable
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1860: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(bname) + strlen(suffix) + 1;
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzf.c:1860: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(bname) + strlen(suffix) + 1;
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:183: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 *name = malloc(strlen(argv[optind]) + 5);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:230:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((c = read(f_src, buffer, WINDOW_SIZE)) > 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:234:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((c = read(f_src, buffer, WINDOW_SIZE)) > 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:298:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int len = strlen(argv[optind]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/bgzip.c:316: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).
                name[strlen(name) - 3] = '\0';
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:441: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(prefix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:569: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(prefix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:1213: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(prefix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:1533: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(prefix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_codecs.c:1734: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(prefix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2003: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).
    cr->ntags = strlen((char *)TN)/3; // optimise to remove strlen
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_decode.c:2859: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).
            name_len = strlen(fd->prefix);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:554: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).
            if (bgzf_write(fp, buf, strlen(buf)) < 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:567: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).
        if (bgzf_write(fp, buf, strlen(buf)) < 0)
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_index.c:651: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).
                ret = (bgzf_write(fp, buf, strlen(buf)) >= 0)? 0 : -4;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1629: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).
    size_t fn_l = strlen(fn);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1921:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path, dir, cp-dir);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1926:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(fn);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1938: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).
            l = MIN(l, strlen(fn));
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1941:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(path, fn, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1960:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(dir);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:1966:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(fn) + ((*fn && path > start && path[-1] != '/') ? 1 : 0);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:2095:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path, path2, PATH_MAX);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3234:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1000);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3735: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).
    size_t in_l = strlen(in);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3740:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(out, in, PATH_MAX);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3747: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).
            (len = strlen(out))+1+strlen(in) >= PATH_MAX) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3747: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).
            (len = strlen(out))+1+strlen(in) >= PATH_MAX) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:3748:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(out, in, PATH_MAX);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:4058: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(mode) > 1 && (mode[1] == 'b' || mode[1] == 'c')) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_io.c:4126:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(def->file_id, filename, 20);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/cram_samtools.c:109:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)cp, qname, qname_len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:109: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).
    newsearch = (char *)malloc((len = strlen(searchpath))+5);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:174: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).
    int maxlen = 8190 - strlen(file), len;
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:181: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).
            cp += strlen(strcpy(cp, file));
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:219: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(dirname);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:220: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).
    size_t lenf = strlen(file);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:241:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(path_end, dirname, (endp+1)-dirname);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:247:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(path_end, dirname, cp-dirname);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:250:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(path_end, file, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:251: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).
                path_end += MIN(strlen(file), l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:252: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).
                file     += MIN(strlen(file), l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:255: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).
                path_end += strlen(file);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:256: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).
                file     += strlen(file);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:261:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path_end, dirname, len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:262: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).
        path_end += MIN(strlen(dirname), len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:331: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).
    for (ele = newsearch; *ele; ele += strlen(ele)+1) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/open_trace_file.c:401: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).
    for (ele = newsearch; *ele; ele += strlen(ele)+1) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:122:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(sh->ref[nref].name, tag->str+3, tag->len-3);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:165:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(sh->rg[nrg].name, tag->str+3, tag->len-3);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:167: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).
                sh->rg[nrg].name_len = strlen(sh->rg[nrg].name);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:208:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(sh->pg[npg].name, tag->str+3, tag->len-3);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:210: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).
                sh->pg[npg].name_len = strlen(sh->pg[npg].name);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:289: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(lines);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/sam_header.c:1248: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).
        nbytes += strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/string_alloc.c:143: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).
    return string_ndup(a_str, instr, strlen(instr));
data/bedtools-2.29.2+dfsg/src/utils/htslib/cram/string_alloc.c:151:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(str, instr, len);
data/bedtools-2.29.2+dfsg/src/utils/htslib/faidx.c:736: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).
    name_end = l = strlen(str);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:174:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = fp->backend->read(fp, fp->end, fp->limit - fp->end);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:304:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t n = fp->backend->read(fp, dest, nbytes);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:520:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                         : read(fp->fd, buffer, nbytes);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:609:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = hcb->ops.read ? hcb->ops.read(hcb->ops.cb_data, buffer, nbytes) : 0;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:609:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = hcb->ops.read ? hcb->ops.read(hcb->ops.cb_data, buffer, nbytes) : 0;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:872:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size = hts_base64_decoded_length(strlen(data));
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile.c:878:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size = strlen(data) + 1;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hfile_internal.h:63:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t (*read)(hFILE *fp, void *buffer, size_t nbytes) HTS_RESULT_USED;
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:400:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(smode, mode, 100);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:705:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(arg, str_start, len < 8000 ? len : 8000);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:812:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(simple_mode, mode, cp-mode <= 100 ? cp-mode : 100);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:816:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(simple_mode, mode, 100);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1197:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(s[n-1], q, p - q);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1237:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(s[n++], q, p - q);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1250: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(fname);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:1722: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).
    char *fnidx = (char*)calloc(1, strlen(fn) + 5);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2539: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).
        return s + strlen(s);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2569:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(tmp, reg, q - reg);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2786: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).
        for (p = fn + strlen(fn) - 1; p >= fn; --p)
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2848: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).
    l_fn = strlen(fn); l_ext = strlen(ext);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2848: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).
    l_fn = strlen(fn); l_ext = strlen(ext);
data/bedtools-2.29.2+dfsg/src/utils/htslib/hts.c:2866: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).
    l_fn = strlen(local_fn);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hfile.h:59:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t (*read)(void* cb_data, void* buf, size_t sz);
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/hfile.h:241: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).
    size_t nbytes = strlen(text), n = fp->limit - fp->begin;
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/knetfile.h:35:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define netread(fd, ptr, len) read(fd, ptr, len)
data/bedtools-2.29.2+dfsg/src/utils/htslib/htslib/kstring.h:157:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return kputsn(p, strlen(p), s);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:246: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(cmd);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:320:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(fp->host, fn + 6, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:321: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).
	fp->retr = (char*)calloc(strlen(p) + 8, 1);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:323: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).
    fp->size_cmd = (char*)calloc(strlen(p) + 8, 1);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:390:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(fp->http_host, fn + 7, l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/knetfile.c:543:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				curr = read(fp->fd, (void*)((char*)buf + l), rest);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:135: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).
	int sl = strlen(cp);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:209:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	l = strlen(s);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:261:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s->l += strlen(s->s + s->l);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:344:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:344:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep);
data/bedtools-2.29.2+dfsg/src/utils/htslib/kstring.c:349:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return (char*)kmemmem(str, n, pat, strlen(pat), _prep);
data/bedtools-2.29.2+dfsg/src/utils/htslib/multipart.c:83: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).
                (strlen(p->url) > 120)? "..." : "");
data/bedtools-2.29.2+dfsg/src/utils/htslib/multipart.c:97:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          fp->currentfp->backend->read(fp->currentfp, buffer, nbytes)
data/bedtools-2.29.2+dfsg/src/utils/htslib/plugin.c:77:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    else itr->suffix = PLUGIN_EXT, itr->suffix_len = strlen(PLUGIN_EXT);
data/bedtools-2.29.2+dfsg/src/utils/htslib/plugin.c:109: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).
            size_t d_name_len = strlen(e->d_name);
data/bedtools-2.29.2+dfsg/src/utils/htslib/probaln.c:299: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).
    l_ref = strlen((char*)ref); l_query = strlen((char*)query);
data/bedtools-2.29.2+dfsg/src/utils/htslib/probaln.c:299: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).
    l_ref = strlen((char*)ref); l_query = strlen((char*)query);
data/bedtools-2.29.2+dfsg/src/utils/htslib/realn.c:96: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 (b->core.l_qseq != strlen((const char *) tg + 1)) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/regidx.c:176: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/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:252: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).
        name_len = strlen(p) + 1;
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:912:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(sn, q, r - q);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1143: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).
                    && strlen(val) == end - beg - 4)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1153: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 (h->l_text > UINT32_MAX - strlen(SAM_FORMAT_VERSION) - 9)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1155: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).
        h->l_text += strlen(SAM_FORMAT_VERSION) + 8;
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1157:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (h->l_text > UINT32_MAX - strlen(val) - 5)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1159: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).
            h->l_text += strlen(val) + 4;
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1173:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (h->l_text > UINT32_MAX - strlen(val) - 5)
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:1175: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).
            h->l_text += strlen(val) + 4;
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2079:42:  [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.
    else if (strcmp(format, "bam") == 0) strcpy(mode, "b");
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2080:43:  [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.
    else if (strcmp(format, "cram") == 0) strcpy(mode, "c");
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2081:42:  [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.
    else if (strcmp(format, "sam") == 0) strcpy(mode, "");
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2094: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).
    char *mode_opts = malloc((format ? strlen(format) : 1) +
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2095: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).
                             (mode   ? strlen(mode)   : 1) + 12);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2103: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).
    cp = mode_opts + strlen(mode_opts);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2124: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).
        format_len = strlen(format);
data/bedtools-2.29.2+dfsg/src/utils/htslib/sam.c:2151:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define STRNCMP(a,b,n) (strncasecmp((a),(b),(n)) || strlen(a)!=(n))
data/bedtools-2.29.2+dfsg/src/utils/htslib/synced_bcf_reader.c:958: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(regions);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.c:72: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 l = strlen(fname);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tabix.c:505: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).
    char *idx_fname = calloc(strlen(fname) + 5, 1);
data/bedtools-2.29.2+dfsg/src/utils/htslib/tbx.c:194: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).
        l += strlen(kh_key(d, k)) + 1; // +1 to include '\0'
data/bedtools-2.29.2+dfsg/src/utils/htslib/tbx.c:203:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int x = strlen(name[i]) + 1;
data/bedtools-2.29.2+dfsg/src/utils/htslib/tbx.c:321: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).
    for (; p - nm < l_nm; p += strlen(p) + 1) {
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1010:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(random() % 100000); // to coerce job completion out of order
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1051:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(500000 * ((job&31)==31) + random() % 10000);
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1097:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(10000);
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1248:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(random() % 10000); // fast job
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1274:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(random() % 100000); // slow job
data/bedtools-2.29.2+dfsg/src/utils/htslib/thread_pool.c:1299:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(random() % 10000); // fast job
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:130:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(s, p, q - p);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1282:69:  [1] (buffer) strlen:
  Does not handle 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 ( line->d.id && strcmp(line->d.id, ".") ) bcf_enc_vchar(str, strlen(line->d.id), line->d.id);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1290: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).
        bcf_enc_vchar(str, strlen(line->d.allele[i]), line->d.allele[i]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1291:55:  [1] (buffer) strlen:
  Does not handle 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 ( !line->rlen && line->n_allele ) line->rlen = strlen(line->d.allele[0]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1368:63:  [1] (buffer) strlen:
  Does not handle 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 ( !line->rlen && line->n_allele ) line->rlen = strlen(line->d.allele[0]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1602:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            bcf_hrec_add_key(hrec, "ID", strlen("ID"));
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:1603:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            bcf_hrec_set_val(hrec, hrec->nkeys-1, (char*) names[i], strlen(names[i]), 0);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3304: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).
            line->rlen = line->n_allele ? strlen(line->d.allele[0]) : 0;
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3332: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).
            bcf_enc_vchar(&str, strlen((char*)values), (char*)values);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3386: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(values[i]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3586: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).
    line->rlen = end_info ? end_info->v1.i - line->pos : strlen(line->d.allele[0]);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3654: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(id);
data/bedtools-2.29.2+dfsg/src/utils/htslib/vcf.c:3664: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).
        tmp.l = strlen(line->d.id);
data/bedtools-2.29.2+dfsg/src/windowBed/windowMain.cpp:60: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/windowBed/windowMain.cpp:73: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/windowMaker/windowMakerMain.cpp:50: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).
        int parameterLength = (int)strlen(argv[i]);
data/bedtools-2.29.2+dfsg/src/windowMaker/windowMakerMain.cpp:63: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).
        int parameterLength = (int)strlen(argv[i]);

ANALYSIS SUMMARY:

Hits = 704
Lines analyzed = 98613 in approximately 2.56 seconds (38495 lines/second)
Physical Source Lines of Code (SLOC) = 68064
Hits@level = [0] 420 [1] 232 [2] 370 [3]  50 [4]  49 [5]   3
Hits@level+ = [0+] 1124 [1+] 704 [2+] 472 [3+] 102 [4+]  52 [5+]   3
Hits/KSLOC@level+ = [0+] 16.5139 [1+] 10.3432 [2+] 6.93465 [3+] 1.49859 [4+] 0.763987 [5+] 0.0440762
Dot directories skipped = 2 (--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.