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/dindel-1.01-wu1-3+dfsg/DInDel.hpp Examining data/dindel-1.01-wu1-3+dfsg/Fasta.hpp Examining data/dindel-1.01-wu1-3+dfsg/Faster.cpp Examining data/dindel-1.01-wu1-3+dfsg/Faster.hpp Examining data/dindel-1.01-wu1-3+dfsg/GetCandidates.cpp Examining data/dindel-1.01-wu1-3+dfsg/GetCandidates.hpp Examining data/dindel-1.01-wu1-3+dfsg/HapBlock.cpp Examining data/dindel-1.01-wu1-3+dfsg/HapBlock.hpp Examining data/dindel-1.01-wu1-3+dfsg/Haplotype.hpp Examining data/dindel-1.01-wu1-3+dfsg/HaplotypeDistribution.cpp Examining data/dindel-1.01-wu1-3+dfsg/HaplotypeDistribution.hpp Examining data/dindel-1.01-wu1-3+dfsg/Library.hpp Examining data/dindel-1.01-wu1-3+dfsg/MLAlignment.hpp Examining data/dindel-1.01-wu1-3+dfsg/MyBam.hpp Examining data/dindel-1.01-wu1-3+dfsg/ObservationModel.hpp Examining data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp Examining data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.hpp Examining data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp Examining data/dindel-1.01-wu1-3+dfsg/OutputData.hpp Examining data/dindel-1.01-wu1-3+dfsg/Read.hpp Examining data/dindel-1.01-wu1-3+dfsg/ReadIndelErrorModel.hpp Examining data/dindel-1.01-wu1-3+dfsg/Utils.hpp Examining data/dindel-1.01-wu1-3+dfsg/Variant.hpp Examining data/dindel-1.01-wu1-3+dfsg/VariantFile.hpp Examining data/dindel-1.01-wu1-3+dfsg/StringHash.hpp Examining data/dindel-1.01-wu1-3+dfsg/DInDel.cpp FINAL RESULTS: data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:277:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s:%d-%d", params.tid.c_str(), lpos, rpos); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:525: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. system(cmd.str().c_str()); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:629: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. system(cmd.str().c_str()); data/dindel-1.01-wu1-3+dfsg/Fasta.hpp:52:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s:%d-%d", tid.c_str(), start, end); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:1286: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). glfOutput.open(glfFile.c_str()); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:2860: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). of.open(fname.c_str()); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:2869: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). of.open(fname.c_str()); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:2899: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). of.open(fname.c_str()); data/dindel-1.01-wu1-3+dfsg/Library.hpp:143: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). fin.open(fileName.c_str()); data/dindel-1.01-wu1-3+dfsg/VariantFile.hpp:107:3: [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(fileName); data/dindel-1.01-wu1-3+dfsg/VariantFile.hpp:110:6: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int open(const string & fileName) data/dindel-1.01-wu1-3+dfsg/VariantFile.hpp:112: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). fin.open(fileName.c_str()); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:276: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). str = (char*)calloc(strlen(params.tid.c_str()) + 30, 1); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:728:72: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DetInDel::CIGAR DetInDel::getCIGAR(const Haplotype & hap, const Read & read, const MLAlignment & ml, int refSeqStart) data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:731:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (ml.hpos.size()!=read.size()) throw string("Read is not properly aligned!"); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:744:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). vector<int> npos(read.size()); // npos records position of read base on the reference sequence data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:745:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (int b=0;b<int(read.size());b++) { data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:771:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b=read.size()-1; data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:777:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cig.push_back(CIGAR::CIGOp(BAM_CSOFT_CLIP, read.size())); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:870:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.size()-1 - lastbonh>0) { data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:871:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cig.push_back(CIGAR::CIGOp(BAM_CSOFT_CLIP,read.size()-1 - lastbonh)); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:1742:71: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DetInDel::computeHapPosition(const Haplotype & hap, const Read & read, vector<int> & alPos, int leftPos) data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:1746:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const bam1_t *b=read.getBam(); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:3997:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read read; data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4004:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.seq.seq= "ATCGATTCGTGATAATATTCAATGTAGTCGCTAG"; data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4014:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.mapQual=1-1e-16; data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4017:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.setAllQual(0.99); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4019:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ObservationModelFBMaxErr omfbe(hap, read, 0, obsParams); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4035:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read read; data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4041:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.seq.seq= "CAAACAGGAAACTCTGCAAGCCATACTAAGACCAAAGCTTAGTTA"; data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4044:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.mapQual=1-1e-16; data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4047:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.setAllQual(0.99); data/dindel-1.01-wu1-3+dfsg/DInDel.cpp:4049:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ObservationModelFBMaxErr omfbe(hap, read, 0, obsParams); data/dindel-1.01-wu1-3+dfsg/DInDel.hpp:138:62: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void computeHapPosition(const Haplotype & hap, const Read & read, vector<int> & alPos, int leftPos); data/dindel-1.01-wu1-3+dfsg/DInDel.hpp:174:53: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). CIGAR getCIGAR(const Haplotype & hap, const Read & read, const MLAlignment & ml, int refSeqStart); data/dindel-1.01-wu1-3+dfsg/Fasta.hpp:51: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). str = (char*)calloc(strlen(tid.c_str()) + 30, 1); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:65:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32_t mReadStart=uint32_t(read.posStat.first); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:66:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32_t readEnd=mReadStart+uint32_t(read.size())-1; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:74:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bMid=int(read.size())-1; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:84:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (bMid>=int(read.size())) { bMid=int(read.size())-1; }; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:84:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (bMid>=int(read.size())) { bMid=int(read.size())-1; }; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:95:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). logMatch.resize(read.size()); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:96:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). logMismatch.resize(read.size()); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:97:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cumLogMatch.resize(read.size()); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:101:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (size_t r=0;r<read.size();r++) { data/dindel-1.01-wu1-3+dfsg/Faster.cpp:102:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). double rq=read.qual[r]; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:116:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). double mq=1.0-read.mapQual; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:140:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t x=0, xl=read.size()-kmer; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:142:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unsigned int key=hash.convert(read.seq.seq,x); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:156:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (x!=xl) key = hash.pushBack(key, read.seq.seq[x+kmer]); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:619:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). string seq=read.seq.seq.substr(rpos,len); data/dindel-1.01-wu1-3+dfsg/Faster.cpp:630:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.seq[b]!=hap.seq[s-1]) { data/dindel-1.01-wu1-3+dfsg/Faster.cpp:634:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). snp+=read.seq[b]; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:642:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ml.align[s-1]=read.seq[b]; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:704:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char nuc=read.seq.seq[b]; data/dindel-1.01-wu1-3+dfsg/Faster.cpp:763:74: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cout << prefix<<prLeftHap<<rhap<<rightHap << " " << ins << " read: " << read.seq.seq << endl; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:28:145: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ObservationModelFB::ObservationModelFB(const Haplotype & _hap, const Read & r, uint32_t hapStart, const ObservationModelParameters & _params) : read(r), params(_params) data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:52:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32_t mReadStart=uint32_t(read.posStat.first); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:53:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32_t readEnd=mReadStart+uint32_t(read.size())-1; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:56:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.isUnmapped()) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:57:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bMid = int ( read.size()/2 ); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:60:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bMid=int(read.size()/2); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:71:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bMid=int(read.size()/2); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:99:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (bMid>=int(read.size())) { cout << "BMIDERROR" << endl; bMid=int(read.size())-1; }; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:99:70: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (bMid>=int(read.size())) { cout << "BMIDERROR" << endl; bMid=int(read.size())-1; }; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:226:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). double rq=read.qual[b]; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:227:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char nuc=read.seq[b]; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:279:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (params.mapUnmappedReads && read.isPaired()) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:283:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read.mateIsUnmapped() && read.mateLen != -1 && read.getBam()->core.tid == read.getBam()->core.mtid) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:283:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read.mateIsUnmapped() && read.mateLen != -1 && read.getBam()->core.tid == read.getBam()->core.mtid) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:283:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read.mateIsUnmapped() && read.mateLen != -1 && read.getBam()->core.tid == read.getBam()->core.mtid) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:283:82: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read.mateIsUnmapped() && read.mateLen != -1 && read.getBam()->core.tid == read.getBam()->core.mtid) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:284:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.mateIsReverse()) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:285:53: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for ( int x=1;x<hapSize+1;x++) pinsert[x] = log(read.getLibrary().getProb(abs(hapStart+x-bMid-int(read.matePos+read.mateLen)))); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:285:103: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for ( int x=1;x<hapSize+1;x++) pinsert[x] = log(read.getLibrary().getProb(abs(hapStart+x-bMid-int(read.matePos+read.mateLen)))); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:285:116: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for ( int x=1;x<hapSize+1;x++) pinsert[x] = log(read.getLibrary().getProb(abs(hapStart+x-bMid-int(read.matePos+read.mateLen)))); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:287:53: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for ( int x=1;x<hapSize+1;x++) pinsert[x] = log(read.getLibrary().getProb(abs(hapStart+x+readSize-bMid-int(read.matePos)))); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:287:112: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for ( int x=1;x<hapSize+1;x++) pinsert[x] = log(read.getLibrary().getProb(abs(hapStart+x+readSize-bMid-int(read.matePos)))); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:289:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pinsert[0] = log(read.getLibrary().getNinetyFifthPctProb()); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:329:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readSize=read.seq.size(); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:734:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cout << "read: " << read.seq << " hap: " << hap.seq << endl; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:817:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char nuc=read.seq[b]; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:818:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.qual[b]<params.baseQualThreshold) { nuc=::tolower(nuc); }; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1092:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). computeBMidPrior(priorRMQ, read.mapQual); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1392:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). string seq=read.seq.seq.substr(rpos,len); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1404:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.qual[b]>params.checkBaseQualThreshold){ data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1406:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ml.mLogBQ+=log10(1.0-read.qual[b]); data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1410:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.seq[b]!=hap.seq[s-1]) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1414:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). snp+=read.seq[b]; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1420:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.qual[b]>params.checkBaseQualThreshold) { data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1429:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.qual[b]>0.95) ml.numMismatch++; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1434:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ml.align[s-1]=read.seq[b]; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1499:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char nuc=read.seq.seq[b]; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.cpp:1558:74: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cout << prefix<<prLeftHap<<rhap<<rightHap << " " << ins << " read: " << read.seq.seq << endl; data/dindel-1.01-wu1-3+dfsg/ObservationModelFB.hpp:82:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read read; data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:39:72: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void getFlankingCoordinatesBetter(const Haplotype & hap, const Read & read, AlignedVariant & av) data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:77:89: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rightFlankRead = av.getStartRead()+1 + (rightFlankHap-sh-l); if (rightFlankRead>=int(read.seq.size())) leftFlankRead = read.seq.size()-1; data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:77:123: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rightFlankRead = av.getStartRead()+1 + (rightFlankHap-sh-l); if (rightFlankRead>=int(read.seq.size())) leftFlankRead = read.seq.size()-1; data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:124:87: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rightFlankRead = av.getStartRead()+l + (rightFlankHap-sh); if (rightFlankRead>=int(read.seq.size())) leftFlankRead = read.seq.size()-1; data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:124:121: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rightFlankRead = av.getStartRead()+l + (rightFlankHap-sh); if (rightFlankRead>=int(read.seq.size())) leftFlankRead = read.seq.size()-1; data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:133:66: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rightFlankRead = av.getStartRead()+1; if (rightFlankRead>=int(read.seq.size())) leftFlankRead = read.seq.size()-1; data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:133:100: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rightFlankRead = av.getStartRead()+1; if (rightFlankRead>=int(read.seq.size())) leftFlankRead = read.seq.size()-1; data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:145:123: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Align<TSource, TSpec> const & source, MLAlignment & ml, int hlen, int rlen, const Haplotype & hap, const Read & read) data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:208:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). realign.getFlankingCoordinatesBetter(hap, read, av); data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:230:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). realign.getFlankingCoordinatesBetter(hap, read, ml.snps[hb]); data/dindel-1.01-wu1-3+dfsg/ObservationModelSeqAn.hpp:252:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). realign.getFlankingCoordinatesBetter(hap, read, ml.indels[hb-len]); data/dindel-1.01-wu1-3+dfsg/Read.hpp:408:59: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). friend ostream &operator<<(ostream &stream, const Read & read) data/dindel-1.01-wu1-3+dfsg/Read.hpp:410:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cout << "pos: " << read.pos << " 1-mapping quality: " << 1.0-read.mapQual << " "; data/dindel-1.01-wu1-3+dfsg/Read.hpp:410:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cout << "pos: " << read.pos << " 1-mapping quality: " << 1.0-read.mapQual << " "; data/dindel-1.01-wu1-3+dfsg/Read.hpp:411:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (size_t b=0;b<read.seq.size();b++) stream << read.seq[b]; data/dindel-1.01-wu1-3+dfsg/Read.hpp:411:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (size_t b=0;b<read.seq.size();b++) stream << read.seq[b]; data/dindel-1.01-wu1-3+dfsg/Read.hpp:412:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (size_t b=0;b<read.qual.size();b++) stream << " " << read.qual[b]; data/dindel-1.01-wu1-3+dfsg/Read.hpp:412:60: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (size_t b=0;b<read.qual.size();b++) stream << " " << read.qual[b]; ANALYSIS SUMMARY: Hits = 113 Lines analyzed = 12017 in approximately 0.31 seconds (38259 lines/second) Physical Source Lines of Code (SLOC) = 7830 Hits@level = [0] 0 [1] 101 [2] 8 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 113 [1+] 113 [2+] 12 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 14.4317 [1+] 14.4317 [2+] 1.53257 [3+] 0.510856 [4+] 0.510856 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.