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/blasr-5.3.3+dfsg/Blasr.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/BuildSequenceDB.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/BwtToSuffixArray.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/Evolve.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/ExciseRepeats.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/PrintTupleCountTable.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/SALS.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/SAModify.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/SWMatcher.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/SimpleShredder.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp
Examining data/blasr-5.3.3+dfsg/extrautils/SuffixArrayToBWT.cpp
Examining data/blasr-5.3.3+dfsg/iblasr/BlasrAlign.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/BlasrHeaders.h
Examining data/blasr-5.3.3+dfsg/iblasr/BlasrMiscs.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/BlasrMiscsImpl.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/BlasrUtils.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/MappingBuffers.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/MappingIPC.h
Examining data/blasr-5.3.3+dfsg/iblasr/MappingParameters.h
Examining data/blasr-5.3.3+dfsg/iblasr/MappingSemaphores.h
Examining data/blasr-5.3.3+dfsg/iblasr/ReadAlignments.hpp
Examining data/blasr-5.3.3+dfsg/iblasr/RegisterBlasrOptions.h
Examining data/blasr-5.3.3+dfsg/iblasr/RegisterFilterOptions.h
Examining data/blasr-5.3.3+dfsg/utils/LoadPulses.cpp
Examining data/blasr-5.3.3+dfsg/utils/PulseToFasta.cpp
Examining data/blasr-5.3.3+dfsg/utils/SAWriter.cpp
Examining data/blasr-5.3.3+dfsg/utils/SDPMatcher.cpp
Examining data/blasr-5.3.3+dfsg/utils/SamFilter.cpp
Examining data/blasr-5.3.3+dfsg/utils/SamToCmpH5.cpp
Examining data/blasr-5.3.3+dfsg/utils/SamToM4.cpp
Examining data/blasr-5.3.3+dfsg/utils/ToAfg.cpp

FINAL RESULTS:

data/blasr-5.3.3+dfsg/Blasr.cpp:1354:33:  [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 *profileFileName = getenv("CPUPROFILE");
data/blasr-5.3.3+dfsg/utils/SamFilter.cpp:231:29:  [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 *profileFileName = getenv("CPUPROFILE");
data/blasr-5.3.3+dfsg/utils/SamFilter.cpp:317: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(time(NULL));
data/blasr-5.3.3+dfsg/utils/SamFilter.cpp:319: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/blasr-5.3.3+dfsg/Blasr.cpp:708:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        threadOut.open(threadLogFileName.c_str(), std::ios::out | std::ios::app);
data/blasr-5.3.3+dfsg/extrautils/SAModify.cpp:41: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).
            bltPrefixLength = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/SAModify.cpp:44: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).
            lcpLength = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/SWMatcher.cpp:46: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).
            insertion = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/SWMatcher.cpp:48: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).
            deletion = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/SWMatcher.cpp:85: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).
            match = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/SWMatcher.cpp:87: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).
            mismatch = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:59: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).
            contextLength = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:61: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).
            minSamples = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:63: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).
            maxSamples = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SAWriter.cpp:86: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).
                    bltPrefixLength = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SAWriter.cpp:112: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).
                    diffCoverSize = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SDPMatcher.cpp:43:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    tm.Initialize(atoi(argv[3]));
data/blasr-5.3.3+dfsg/utils/SDPMatcher.cpp:69: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).
            indel = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SDPMatcher.cpp:71: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).
            sdpIndel = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SDPMatcher.cpp:73: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).
            sdpIns = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SDPMatcher.cpp:75: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).
            sdpDel = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SDPMatcher.cpp:81: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).
            match = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/SamFilter.cpp:198:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/blasr-5.3.3+dfsg/utils/SamFilter.cpp:199:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "ref%06d", refNameIndex + 1);
data/blasr-5.3.3+dfsg/utils/ToAfg.cpp:56: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).
            minSubreadLength = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/utils/ToAfg.cpp: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).
            uniformQV = atoi(argv[++argi]);
data/blasr-5.3.3+dfsg/Blasr.cpp:843:52:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                SMRTDistanceMatrix[a][b] += params.mismatch;
data/blasr-5.3.3+dfsg/Blasr.cpp:1098: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).
            fastaGenome.titleLength = strlen(genome.title);
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:75:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    SMRTSequence read;
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:137:69:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        cmpReader.ImportReadFromCmpH5(alignmentIndex, cmpAlignment, read);
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:141:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read.length < contextLength) {
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:251:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (seqPos < static_cast<int>(read.length)) {
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:252:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    sample.CopyFromSeq(read, seqPos, sampleLength);
data/blasr-5.3.3+dfsg/extrautils/StoreQualityByContextFromCmpH5.cpp:263:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read.Free();
data/blasr-5.3.3+dfsg/iblasr/BlasrAlign.hpp:10:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void MapRead(T_Sequence &read, T_Sequence &readRC, T_RefSequence &genome, T_SuffixArray &sarray,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlign.hpp:17:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void MapRead(T_Sequence &read, T_Sequence &readRC,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlign.hpp:27:64:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void AlignIntervals(T_TargetSequence &genome, T_QuerySequence &read, T_QuerySequence &rcRead,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:8:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void MapRead(T_Sequence &read, T_Sequence &readRC, T_RefSequence &genome, T_SuffixArray &sarray,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:34:62:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            numKeysMatched = MapReadToGenome(genome, sarray, read, params.lookupTableLength,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:48:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            numKeysMatched = MapReadToGenome(bwt, read, read.SubreadStart(), read.SubreadEnd(),
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:48:57:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            numKeysMatched = MapReadToGenome(bwt, read, read.SubreadStart(), read.SubreadEnd(),
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:48:78:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            numKeysMatched = MapReadToGenome(bwt, read, read.SubreadStart(), read.SubreadEnd(),
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:69:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            *mapData->anchorFilePtr << read.title << std::endl;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:96:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        PValueWeightor lisPValue(read, genome, ct.tm, &ct);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:115:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        DNALength squareRefLength = read.length * 1.25 + params.limsAlign;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:155:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                std::string dotPlotName = std::string(read.title) + ".anchors";
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:177:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                (DNALength)((read.SubreadLength()) * (1 + params.indelRate)), params.nCandidates,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:180:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                lisWeightFn, topIntervals, genome, read, intervalSearchParameters,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:189:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                (DNALength)((read.SubreadLength()) * (1 + params.indelRate)), params.nCandidates,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:199:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                (DNALength)((read.SubreadLength()) * (1 + params.indelRate)), params.nCandidates,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:202:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                lisWeightFn, topIntervals, genome, read, intervalSearchParameters,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:209:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                (DNALength)((read.SubreadLength()) * (1 + params.indelRate)), params.nCandidates,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:219:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                (DNALength)((read.SubreadLength()) * (1 + params.indelRate)), params.nCandidates,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:222:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                lisWeightFn, topIntervals, genome, read, intervalSearchParameters,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:229:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                (DNALength)((read.SubreadLength()) * (1 + params.indelRate)), params.nCandidates,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:280:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        AlignIntervals(genome, read, readRC, topIntervals, SMRTDistanceMatrix, params.indel,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:298:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        matchFound = CheckForSufficientMatch(read, alignmentPtrs, params);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:313:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            metrics.RecordNumAlignedBases(read.length);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:341:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (i = 0; i < read.length; i++) {
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:342:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read.seq[i] != 'N') effectiveReadLength++;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:345:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        RemoveLowQualityAlignments(read, alignmentPtrs, params);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:356:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bothQueryStrands[Forward] = &read;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:365:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        RemoveLowQualityAlignments(read, alignmentPtrs, params);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:476:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                << read.length << " " << alignmentPtrs[0]->score << " "
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:497:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            aref->qName = read.GetName();
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:507:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void MapRead(T_Sequence &read, T_Sequence &readRC,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:522:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return MapRead(read, readRC,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:550:64:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void AlignIntervals(T_TargetSequence &genome, T_QuerySequence &read, T_QuerySequence &rcRead,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:564:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    forrev[Forward] = &read;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:616:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                      << "read_length=" << read.length << "; interval=" << (*intvIt)
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:635:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        DNALength subreadStart = read.SubreadStart();
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:636:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        DNALength subreadEnd = read.SubreadEnd();
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:638:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            subreadEnd = read.MakeRCCoordinate(read.SubreadStart()) + 1;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:638:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            subreadEnd = read.MakeRCCoordinate(read.SubreadStart()) + 1;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:639:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            subreadStart = read.MakeRCCoordinate(read.SubreadEnd() - 1);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:639:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            subreadStart = read.MakeRCCoordinate(read.SubreadEnd() - 1);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:697:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        alignment->qName = read.title;
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:715:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                      << read.length - (*intvIt).qEnd << " ?> " << matchIntervalEnd - (*intvIt).end
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:718:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read.length - (*intvIt).qEnd > matchIntervalEnd - (*intvIt).end) {
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:765:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        assert(read.length == rcRead.length);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:766:56:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ConfigureQuery(alignment->qStrand == Forward ? read : rcRead);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:867:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        rcMatches[revCompIndex].q = read.MakeRCCoordinate(
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:1042:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            alignment->qAlignedSeq.ReferenceSubstring(read, alignment->qAlignedSeqPos,
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:1084:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                readSuffixLength = std::min(read.length - lastAlignedQPos, maximumExtendLength);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:1086:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    readSuffix.ReferenceSubstring(read, lastAlignedQPos, readSuffixLength);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:1145:61:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    assert(alignment->qAlignedSeq.length <= read.length);
data/blasr-5.3.3+dfsg/iblasr/BlasrAlignImpl.hpp:1154:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    readPrefix.ReferenceSubstring(read, firstAlignedQPos - readPrefixLength,
data/blasr-5.3.3+dfsg/iblasr/BlasrMiscs.hpp:9:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                 T_Sequence &read, std::string &readGroupId, int &associatedRandInt,
data/blasr-5.3.3+dfsg/iblasr/BlasrMiscsImpl.hpp:8:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                 T_Sequence &read, std::string &readGroupId, int &associatedRandInt,
data/blasr-5.3.3+dfsg/iblasr/BlasrMiscsImpl.hpp:25:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (reader.GetNext(read, associatedRandInt) == 0) {
data/blasr-5.3.3+dfsg/iblasr/BlasrUtils.hpp:31:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void StoreMapQVs(SMRTSequence &read, std::vector<T_AlignmentCandidate *> &alignmentPtrs,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtils.hpp:37:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool CheckForSufficientMatch(T_Sequence &read, std::vector<T_AlignmentCandidate *> &alignmentPtrs,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtils.hpp:44:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void SumMismatches(SMRTSequence &read, T_AlignmentCandidate &alignment, int mismatchScore,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtils.hpp:64:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int RemoveLowQualityAlignments(T_Sequence &read, std::vector<T_AlignmentCandidate *> &alignmentPtrs,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtils.hpp:104:87:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void PrintAlignments(std::vector<T_AlignmentCandidate *> alignmentPtrs, SMRTSequence &read,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:105:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void StoreMapQVs(SMRTSequence &read, std::vector<T_AlignmentCandidate *> &alignmentPtrs,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:222:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                SumMismatches(read, *alignmentPtrs[*partIt], 15, partitionBeginPos[p],
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:306:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool CheckForSufficientMatch(T_Sequence &read, std::vector<T_AlignmentCandidate *> &alignmentPtrs,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:309:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    (void)(read);
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:334:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void SumMismatches(SMRTSequence &read, T_AlignmentCandidate &alignment, int mismatchScore,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:341:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (not params.ignoreQualities and read.substitutionQV.Empty() == false) {
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:343:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            sum += read.substitutionQV[p];
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:346:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            sum += read.substitutionQV[p];
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:459:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int RemoveLowQualityAlignments(T_Sequence &read, std::vector<T_AlignmentCandidate *> &alignmentPtrs,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:462:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    PB_UNUSED(read);
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:985:87:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void PrintAlignments(std::vector<T_AlignmentCandidate *> alignmentPtrs, SMRTSequence &read,
data/blasr-5.3.3+dfsg/iblasr/BlasrUtilsImpl.hpp:1037:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        PrintAlignment(*alignmentPtrs[i], read, params, alignmentContext, outFile
data/blasr-5.3.3+dfsg/iblasr/MappingParameters.h:34:9:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    int mismatch;
data/blasr-5.3.3+dfsg/iblasr/ReadAlignments.hpp:38:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    SMRTSequence read;
data/blasr-5.3.3+dfsg/iblasr/ReadAlignments.hpp:98:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read.Free();
data/blasr-5.3.3+dfsg/iblasr/ReadAlignments.hpp:160:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read.Print(out);
data/blasr-5.3.3+dfsg/iblasr/ReadAlignments.hpp:164:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
inline ReadAlignments::~ReadAlignments() { read.Free(); }
data/blasr-5.3.3+dfsg/iblasr/RegisterBlasrOptions.h:80:48:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    clp.RegisterIntOption("-mismatch", &params.mismatch, "", CommandLineParser::Integer);
data/blasr-5.3.3+dfsg/utils/SAWriter.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).
        if (strlen(argv[argi]) > 0 and argv[argi][0] == '-') {

ANALYSIS SUMMARY:

Hits = 114
Lines analyzed = 12410 in approximately 0.32 seconds (38708 lines/second)
Physical Source Lines of Code (SLOC) = 9218
Hits@level = [0]   0 [1]  88 [2]  22 [3]   4 [4]   0 [5]   0
Hits@level+ = [0+] 114 [1+] 114 [2+]  26 [3+]   4 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 12.3671 [1+] 12.3671 [2+] 2.82057 [3+] 0.433934 [4+]   0 [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.