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/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/BaseCallerUtils.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/PIDloop.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/PIDloop.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Calibration/CalibrationHelper.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Calibration/FlowAlignment.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Calibration/FlowAlignment.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Calibration/LinearCalibrationModel.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Calibration/LinearCalibrationModel.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/IonVersion.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/RandSchrange.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/SystemMagicDefines.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/OptArgs.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/OptArgs.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/BAMWalkerEngine.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/ExtendParameters.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/MiscUtil.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/MiscUtil.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/VcfFormat.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/VcfFormat.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/ExtendParameters.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/BiasGenerator.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/BiasGenerator.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/CrossHypotheses.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/CrossHypotheses.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/DiagnosticJSON.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/DiagnosticJson.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/PosteriorInference.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/PosteriorInference.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/ShortStack.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/ShortStack.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/SigmaGenerator.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/SigmaGenerator.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/SkewGenerator.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/SkewGenerator.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/StackEngine.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/EnsembleEval/StackEngine.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/DecisionTreeData.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/DecisionTreeData.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/VariantAssist.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/VariantAssist.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HandleVariant.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HandleVariant.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HotspotReader.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HotspotReader.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HypothesisEvaluator.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HypothesisEvaluator.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/MetricsManager.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/MetricsManager.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/OrderedBAMWriter.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/OrderedBAMWriter.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/OrderedVCFWriter.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Reads/ExtendedReadInfo.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Reads/ExtendedReadInfo.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/ReferenceReader.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/SampleManager.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/SampleManager.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/ClassifyVariant.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/ClassifyVariant.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/ErrorMotifs.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/ErrorMotifs.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/LocalContext.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/LocalContext.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/SpliceVariantHypotheses.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/SpliceVariantHypotheses.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/VariantCaller.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/tvcutils.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/tvcutils.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/unify_vcf.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/unify_vcf.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/viterbi.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/viterbi.hpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/BAMWalkerEngine.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/freebayes/src/AlleleParser.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/freebayes/src/AlleleParser.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/freebayes/src/Version.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/BedReader.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/convert.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/join.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/multichoose/multichoose.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/multichoose/multichoose.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/multichoose/multichoose.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/multichoose/multipermute.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/multichoose/multipermute.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/split.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/split.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bam_endian.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bedidx.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/khash.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kseq.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/ksort.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/tabix.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/tabix.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/tabix.hpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_error.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_error.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.h Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/realignment/Realigner.cpp Examining data/tvc-5.0.3+git20151221.80e144e+dfsg/realignment/Realigner.h FINAL RESULTS: data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:233:7: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (readlink (&linkname[0], buffer, path_max) == -1) data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:161:8: [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. fp = popen ("cat /proc/cpuinfo | grep \"cpu cores\" | uniq | awk '{ print $4 }'", "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:171:8: [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. fp = popen ("cat /proc/cpuinfo | grep \"physical\\ id\" | sort | uniq | wc -l", "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:183:10: [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. fp = popen ("grep \"processor\" /proc/cpuinfo | wc -l","r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:264:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (string, "%s/%s", buf, filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:281:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (string, "%s/%s", HOME, filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:301:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (string, "%s/%s", ION_CONFIG, filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:326:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (string, "%s/config/%s", INSTALL, filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:340:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (string, "/opt/ion/config/%s", filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:354:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (string, "/opt/ion/alignTools/%s", filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:393:12: [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. status = system (cmd); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:411:12: [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. status = system (cmd); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:474:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (fileName, "%s/%s", filePath, "processParameters.txt"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:514: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 (arg, argument); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:612:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (banner, "/usr/bin/figlet -m0 Analysis %s 2>/dev/null", IonVersion::GetVersion().c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:613:7: [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 (banner)) data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:764:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (filepath, "%s/%s", dir, filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:776:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (filepath, "%s/%s", parent2, filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:790:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (filepath, "%s/%s", dir, filename_thumbnail); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:864:8: [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. fp = popen ("cat /proc/meminfo | grep \"MemTotal:\" | awk '{ print $2 }'", "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:884:8: [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. fp = popen ("cat /proc/meminfo | grep \"Buffers:\" | awk '{ print $2 }'", "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:904:8: [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. fp = popen ("cat /proc/meminfo | grep \"Cached:\" | awk '{ print $2 }'", "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:924:8: [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. fp = popen ("cat /proc/meminfo | grep \"MemFree:\" | awk '{ print $2 }'", "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.cpp:210:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmpstr,"%s.block_X%d_Y%d", runid.c_str(), tx, ty); // runid.block_X0_Y0 for example data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp:166:22: [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. int num_fields = sscanf(line, "%s\t%d\t%d\t%s", chr_name, &begin, &end, region_name); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp:219:19: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. int numfields = sscanf(line, "%*s\t%*d\t%*d\t%*s\t%*s\t%*s\t%*s\t%s", keybuffer); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:260:7: [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(line2, "%s %d %d", chr, &b, &e); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:861:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:%ld-%ld", fields[0], bed_line.start+1, bed_line.end); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:948:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s (previously seen in line %d)", A->name.c_str(), region_name_map[A->name]); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:125: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(name, argv[optind]); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:648: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). strcat(strcpy(fnidx, fn), ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:703:3: [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); strcat(fnidx, ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:314: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:316: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:415: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.c:13: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, ap); // This line does not work with glibc 2.0. See `man snprintf'. data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.c:20: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, ap); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:12:22: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define error(...) { fprintf(stderr,__VA_ARGS__); return -1; } data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:174: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(fnidx, argv[optind]), ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/tabix.cpp:10: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(fnidx, cfilename), ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:277: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. char *HOME = getenv ("HOME"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:297: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 *ION_CONFIG = getenv ("ION_CONFIG"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/ExtendParameters.cpp:520:21: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *real_path = realpath (path.c_str(), NULL); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:83:21: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *real_path = realpath (path.c_str(), NULL); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:87:14: [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, "cdhfb:s:")) >= 0){ data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:389: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:106:14: [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, "p:s:b:e:0S:c:lhfBr:")) >= 0) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp: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(&child->state[child->window_start], &parent->state[child->window_start], data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:937: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. static const char nuc_int_to_char[5] = "ACGT"; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1161:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&child->prediction[0], &parent->prediction[0], (parent->window_start)*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1200: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. static const char nuc_int_to_char[5] = "ACGT"; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1628: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(&child->state.at(child->window_start), &parent->state.at(child->window_start), data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:34:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char RESTRICT_PTR)dst)[size] = char(0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:62:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char RESTRICT_PTR)dst)[size] = ((char RESTRICT_PTR)src)[size]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:62:40: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char RESTRICT_PTR)dst)[size] = ((char RESTRICT_PTR)src)[size]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1304: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(child->calib_A, parent->calib_A, cpSize); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1305: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(child->calib_B, parent->calib_B, cpSize); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1486: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. static const char nuc_int_to_char[5] = "ACGT"; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.h:62: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 sequence[2*MAX_VALS + 12]; // +12 makes the enitre struct align well data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.h:170: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. ALIGN(16) char ad_Buf[4*MAX_VALS*4*sizeof(float)]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Calibration/LinearCalibrationModel.cpp:836: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). calibration_file.open(model_file_name.c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/OptArgs.cpp:359: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 defaultValue[64]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/OptArgs.cpp:403: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 defaultValue[64]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:225: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 linkname[64] = {0}; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:261: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 buf[bufsize]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:318: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 INSTALL[path_max] = {0}; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:381: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 cmd[size]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:438: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). FILE *fp = fopen (filename, "rb"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:470: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 buf[16384]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:476:8: [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 (fileName, "rb"); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:611: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 banner[256]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:624: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 time_buffer[1024]; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:805: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). file.open (name.c_str() , ifstream::in); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:819: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). size_t virt = atoi (words[0].c_str()) * 4 * 1024 / 1048576; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:820: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). size_t resident = atoi (words[1].c_str()) * 4 * 1024 / 1048576; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.h:64:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. void GetChipDim (const char *type, int dims[2], const char *); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/ExtendParameters.cpp:209:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(json[key].asCString()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/ExtendParameters.cpp:234:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value = atoi(json[long_name_underscores].asCString()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/ExtendParameters.cpp:289:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value = atoi(json[long_name_underscores].asCString()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.cpp:209:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[1024]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.cpp:256:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int x_coord = atoi(my_block_key.substr(x_loc,y_loc-x_loc).c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.cpp:257:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int y_coord = atoi(my_block_key.substr(y_loc+2, my_block_key.size()-y_loc+2).c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/VcfFormat.cpp:18: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 buffer[80]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/VcfFormat.cpp:28: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 time_buffer[1024]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/VcfFormat.cpp:307: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). weight = atoi(current_variant.info["DP"][0].c_str()); // or is this current sample ident? data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/VcfFormat.cpp:447: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). total_depth = atoi(candidate_variant.info["FDP"][0].c_str()); // or is this current sample ident? data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/VcfFormat.cpp:452:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). allele_depth = atoi(candidate_variant.info["FAO"][filtered_allele_index].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/DecisionTreeData.cpp:71:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). unsigned alt_counts_positive = atoi(candidate_variant.info.at("SAF")[_altAlleleIndex].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/DecisionTreeData.cpp:72:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). unsigned alt_counts_negative = atoi(candidate_variant.info.at("SAR")[_altAlleleIndex].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/DecisionTreeData.cpp:74: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). unsigned ref_counts_positive = atoi(candidate_variant.info.at("SRF")[0].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/DecisionTreeData.cpp:75: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). unsigned ref_counts_negative = atoi(candidate_variant.info.at("SRR")[0].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Filter/DecisionTreeData.cpp:520:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). unsigned int scan_read_depth = atoi(candidate_variant.info["FDP"][0].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HotspotReader.cpp:39: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). hotspot_vcf_.open(tmp); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HotspotReader.cpp:61: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). hotspot_vcf.open(hotspot_vcf_filename.c_str(), ifstream::in); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HotspotReader.cpp:203: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). hotspot.params.min_coverage = atoi(min_coverage[alt_idx].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HotspotReader.cpp:208: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). hotspot.params.min_coverage_each_strand = atoi(min_coverage_each_strand[alt_idx].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/HotspotReader.cpp:223: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). hotspot.params.hp_max_length = atoi(hp_max_length[alt_idx].c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:106:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value = atoi(json[long_name_underscores].asCString()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:715: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). out.open(options->output_vcf.c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/MetricsManager.cpp:62: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 bases[5] = "ACGT"; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/MetricsManager.cpp:87: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 bases[5] = "ACGT"; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/OrderedVCFWriter.h:48:24: [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). output_vcf_stream_.open(output_vcf.c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/OrderedVCFWriter.h:53: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). filtered_vcf_stream_.open(filtered_vcf.c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/ReferenceReader.h:36: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). ref_handle_ = open(fasta_filename.c_str(),O_RDONLY); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/ReferenceReader.h:46: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 *fai = fopen(fai_filename.c_str(), "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/ReferenceReader.h:52:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024], chrom_name[1024]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/ErrorMotifs.cpp:25: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 key = get_key(motif.at(hpPos-1), atoi(&motif.at(hpPos))); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/ErrorMotifs.cpp:100: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). infile.open(fname); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Splice/ErrorMotifs.cpp:116: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). val[i++] = atoi(line.substr(pos + 1).c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp:144:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *bed_file = fopen(bed_filename.c_str(), "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp:150: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 line[4096]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp:151: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 chr_name[4096]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp:154: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 region_name[4096]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/TargetsManager.cpp:215: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 keybuffer[4096]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:209: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). int ref_handle = open(reference_filename.c_str(),O_RDONLY); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:216:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fai = fopen((reference_filename+".fai").c_str(), "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:224: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 line[1024], chrom_name[1024]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:239:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(unmerged_bed.c_str(), "r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:244: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 line2[65536]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:258:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char chr[100]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:273:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *input = fopen(input_bed_filename.c_str(),"r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:279: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 line2[65536]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:394:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *input = fopen(input_vcf_filename.c_str(),"r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:400: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 line2[65536]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:565: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). output_vcf = fopen(output_vcf_filename.c_str(), "w"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:577: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). output_bed = fopen(output_bed_filename.c_str(), "w"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/unify_vcf.cpp:79:21: [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). entry->position = atol(s.c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/unify_vcf.cpp:473:16: [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). long p = atol(opos->c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/unify_vcf.cpp:647: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). vcf.open(filename); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:712: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 *input = fopen(input_file.c_str(),"r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:724: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 line[65536]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:782: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 *fields[20]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:857:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:859: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, "hotspot%d", bed.num_lines); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:947: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 buffer[1024]; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:1058:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *output = fopen(output_file.c_str(),"w"); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:1139:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). output_file = fopen(log_filename.c_str(),"w"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/BedReader.h:68: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). atoi(strip(fields[1]).c_str()), data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/BedReader.h:69: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). atoi(strip(fields[2]).c_str()), data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/BedReader.h:104:2: [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(fname); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/BedReader.h:107: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 string& fname) { data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/BedReader.h:108: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). file.open(fname.c_str()); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.cpp:1827: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). cigar.push_back(make_pair(atoi(number.c_str()), type)); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.cpp:1837: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). cigar.push_back(make_pair(atoi(number.c_str()), type)); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.cpp:1854: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). cigar.push_back(make_pair(atoi(number.c_str()), type)); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.cpp:1864: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). cigar.push_back(make_pair(atoi(number.c_str()), type)); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.h:79: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). bool open(string& filename) { data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.h:92: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). _file.open(filename.c_str(), ifstream::in); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.h:106: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). bool open(istream& stream) { data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/Variant.h:112: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). bool open(ifstream& stream) { data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/multichoose/multichoose.c:15: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[1]); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/multichoose/multichoose.cpp:50:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if 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 k = atoi(argv[1]); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bedidx.c:120: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). beg = atoi(str->s); // begin data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bedidx.c:123:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). end = atoi(str->s); // end data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:218: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). fd = open(path, oflag); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:227: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). fd = open(path, oflag, 0666); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:354: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(fp->uncompressed_block, data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:431: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(fp->uncompressed_block, p->block, MAX_BLOCK_SIZE); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:464: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(kh_val(h, k).block, fp->uncompressed_block, MAX_BLOCK_SIZE); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:496: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:547:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(output, buffer + fp->block_offset, copy_length); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzf.c:609: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:55: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 ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0666)) < 0 && errno == EEXIST) { data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:65: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 ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) { data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:92:21: [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); break; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:93:20: [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); break; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:115:17: [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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:126:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(name, ".gz"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:102: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(str->s + str->l, buf + fp->block_offset, l); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:438: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(x, &idx->conf, 24); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:507: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 magic[4]; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:625:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "w")) == 0) { data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:648:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(strcpy(fnidx, fn), ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:703:22: [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. strcpy(fnidx, fn); strcat(fnidx, ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:757: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). *begin = atoi(p); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:760:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *end = atoi(p); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:178: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:252: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:260: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:265: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:266: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:345: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:347: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:349: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:351: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:416:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:417: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:478: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:480: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kseq.h:127: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:52:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fh = fopen(header,"r"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:110:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'S': skip = atoi(optarg); break; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:123: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 's': conf.sc = atoi(optarg); break; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:124: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': conf.bc = atoi(optarg); break; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:125: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 'e': conf.ec = atoi(optarg); break; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:174:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(strcpy(fnidx, argv[optind]), ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/tabix.cpp:10:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(strcpy(fnidx, cfilename), ".tbi"); data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c:99: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 str[32]; data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c:212: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 padding[8]="\0"; data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c:228: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 padding[8]="\0\0\0\0\0\0\0\0"; data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c:271:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[32]="\0"; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:320:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DPTreephaser::WindowedNormalize(BasecallerRead& read, int num_steps, int window_size, const bool normalize_predictions) const data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:322:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int num_flows = read.raw_measurements.size(); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:342:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.prediction[estim_flow] < 0.3) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:343:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). median_set[median_set_size++] = read.raw_measurements[estim_flow] - read.prediction[estim_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:343:77: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). median_set[median_set_size++] = read.raw_measurements[estim_flow] - read.prediction[estim_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:355:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow] - normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:355:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow] - normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:356:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction[apply_flow] = normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:362:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow] - next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:362:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow] - next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:363:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction[apply_flow] = next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:383:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.prediction[estim_flow] > 0.5 and read.normalized_measurements[estim_flow] > 0) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:383:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.prediction[estim_flow] > 0.5 and read.normalized_measurements[estim_flow] > 0) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:384:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). median_set[median_set_size++] = read.normalized_measurements[estim_flow] / read.prediction[estim_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:384:84: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). median_set[median_set_size++] = read.normalized_measurements[estim_flow] / read.prediction[estim_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:397:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction[apply_flow] = (read.prediction[apply_flow] * normalizer) + read.additive_correction[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:397:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction[apply_flow] = (read.prediction[apply_flow] * normalizer) + read.additive_correction[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:397:84: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction[apply_flow] = (read.prediction[apply_flow] * normalizer) + read.additive_correction[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:398:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:398:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:401:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] /= normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:403:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction[apply_flow] = normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:410:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction[apply_flow] = (read.prediction[apply_flow] * next_normalizer) + read.additive_correction[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:410:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction[apply_flow] = (read.prediction[apply_flow] * next_normalizer) + read.additive_correction[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:410:87: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction[apply_flow] = (read.prediction[apply_flow] * next_normalizer) + read.additive_correction[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:411:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:411:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] = read.raw_measurements[apply_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:414:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[apply_flow] /= next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:416:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction[apply_flow] = next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:422:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DPTreephaser::PIDNormalize(BasecallerRead& read, const int num_samples) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:424:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int num_flows = read.raw_measurements.size(); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:434:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rawVal = read.raw_measurements[idx]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:435:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). preVal = read.prediction[idx]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:439:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction[idx] = filtVal; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:442:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[idx] = normVal / filtVal; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:443:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction[idx] = filtVal; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:449:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[idx] = read.raw_measurements[idx]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:449:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[idx] = read.raw_measurements[idx]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:450:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction[idx] = 0.0f; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:451:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction[idx] = 1.0f; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:456:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float DPTreephaser::PIDNormalize(BasecallerRead& read, const int start_flow, const int end_flow) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:467:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (idx = 0; idx < (int)read.raw_measurements.size(); ++idx) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:469:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rawVal = read.raw_measurements[idx]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:470:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). preVal = read.prediction[idx]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:474:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction[idx] = 0.0f; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:475:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[idx] = rawVal / filtVal; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:476:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction[idx] = filtVal; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:484:63: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DPTreephaser::NormalizeAndSolve_Adaptive(BasecallerRead& read, int max_flows) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:495:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Solve(read, solve_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:496:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). WindowedNormalize(read, num_steps, window_size); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:501:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Solve(read, max_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:506:63: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DPTreephaser::NormalizeAndSolve_GainNorm(BasecallerRead& read, int max_flows) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:515:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Solve(read, solve_flow); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:516:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Normalize(read, 11, solve_flow-20); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:521:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Solve(read, max_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:526:61: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DPTreephaser::NormalizeAndSolve_SWnorm(BasecallerRead& read, int max_flows) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:539:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Solve(read, solve_flows, restart_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:540:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). WindowedNormalize(read, num_steps, window_size); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:545:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Solve(read, max_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:551:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float DPTreephaser::Normalize(BasecallerRead& read, int start_flow, int end_flow) const data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:555:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int num_flows = read.raw_measurements.size(); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:559:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.prediction[flow] > 0.5 and read.prediction[flow] <= 4) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:559:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.prediction[flow] > 0.5 and read.prediction[flow] <= 4) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:560:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xy += read.raw_measurements[flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:561:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). yy += read.prediction[flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:576:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[flow] = min(max(read.raw_measurements[flow] / divisor, -1.0f), (float)MAX_HPXLEN); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:576:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.normalized_measurements[flow] = min(max(read.raw_measurements[flow] / divisor, -1.0f), (float)MAX_HPXLEN); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:578:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction.assign(num_flows, 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:579:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction.assign(num_flows, divisor); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:935:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DPTreephaser::Solve(BasecallerRead& read, int max_flows, int restart_flows) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:964:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (vector<char>::iterator nuc = read.sequence.begin(); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:965:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nuc != read.sequence.end() and path_[0].flow < restart_flows; ++nuc) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:972:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction.swap(path_[0].prediction); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:977:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float residual = read.normalized_measurements[flow] - path_[0].prediction[flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:983:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.sequence.clear(); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:984:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.sequence.reserve(2*flow_order_.num_flows()); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:985:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction.assign(flow_order_.num_flows(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1097:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float residual = read.normalized_measurements[flow] - child->prediction[flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1151:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float dot_signal = (read.normalized_measurements[child->flow] - parent->prediction[child->flow]) / child->state[child->flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1177:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float residual = read.normalized_measurements[flow] - parent->prediction[flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1183:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction.swap(parent->prediction); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1184:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.sequence.swap(parent->sequence); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1198:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void DPTreephaser::ComputeQVmetrics(BasecallerRead& read) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1201:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.state_total.assign(flow_order_.num_flows(), 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1203:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.sequence.empty()) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1206:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1206:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1207:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1207:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1221:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; base < (int)read.sequence.size() and read.sequence[base] == flow_order_[solution_flow]; ++base) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1221:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; base < (int)read.sequence.size() and read.sequence[base] == flow_order_[solution_flow]; ++base) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1254:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float residual = read.normalized_measurements[flow] - child->prediction[flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1270:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch[base] = -1; // min delta penalty to earlier base hypothesis data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1271:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual[base] = 0; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1274:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual[base] = penalty[called_nuc] / (solution_flow - parent->window_start); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1280:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch[base] = max(read.penalty_mismatch[base], penalty_mismatch); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1280:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch[base] = max(read.penalty_mismatch[base], penalty_mismatch); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1297:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.state_inphase[solution_flow] = max(recent_state_inphase, 0.01f); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1298:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.state_total[solution_flow] = max(recent_state_total, 0.01f); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.cpp:1301:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.prediction.swap(parent->prediction); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:123:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void NormalizeAndSolve_Adaptive(BasecallerRead& read, int max_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:128:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void NormalizeAndSolve_GainNorm(BasecallerRead& read, int max_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:133:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void NormalizeAndSolve_SWnorm(BasecallerRead& read, int max_flows); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:141:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Solve(BasecallerRead& read, int max_flows, int restart_flows = 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:147:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Simulate(BasecallerRead& read, int max_flows, bool state_inphase=false); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:173:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ComputeQVmetrics(BasecallerRead& read); // Computes "oneMerHeight" and "deltaPenalty" data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:180:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float Normalize(BasecallerRead& read, int start_flow, int end_flow) const; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:188:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void WindowedNormalize(BasecallerRead& read, int num_steps, int window_size, const bool normalize_predictions=false) const; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:195:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PIDNormalize(BasecallerRead& read, const int num_samples); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/DPTreephaser.h:196:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). float PIDNormalize(BasecallerRead& read, const int start_flow, const int end_flow); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:317:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void TreephaserSSE::NormalizeAndSolve(BasecallerRead& read) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:319:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(rd_NormMeasure, &read.raw_measurements[0], num_flows_*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:326:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). WindowedNormalize(read, step); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:339:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.sequence.resize(sv_PathPtr[MAX_PATHS]->sequence_length); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:340:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(&read.sequence[0], sv_PathPtr[MAX_PATHS]->sequence, sv_PathPtr[MAX_PATHS]->sequence_length*sizeof(char)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:341:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(&read.normalized_measurements[0], rd_NormMeasure, num_flows_*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:342:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). setZeroSSE(&read.prediction[0], num_flows_*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:343:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(&read.prediction[0], sv_PathPtr[MAX_PATHS]->pred, to_flow*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:344:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). setZeroSSE(&read.state_inphase[0], num_flows_*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:345:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(&read.state_inphase[0], sv_PathPtr[MAX_PATHS]->state_inphase, to_flow*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1010:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void TreephaserSSE::SolveRead(BasecallerRead& read, int begin_flow, int end_flow) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1014:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert((int)read.normalized_measurements.size() == num_flows_); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1016:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(rd_NormMeasure, &(read.normalized_measurements[0]), num_flows_*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1018:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(sv_PathPtr[MAX_PATHS]->sequence, &(read.sequence[0]), (int)read.sequence.size()*sizeof(char)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1018:70: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(sv_PathPtr[MAX_PATHS]->sequence, &(read.sequence[0]), (int)read.sequence.size()*sizeof(char)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1019:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sv_PathPtr[MAX_PATHS]->sequence_length = read.sequence.size(); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1024:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.sequence.resize(sv_PathPtr[MAX_PATHS]->sequence_length); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1025:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(&(read.sequence[0]), sv_PathPtr[MAX_PATHS]->sequence, sv_PathPtr[MAX_PATHS]->sequence_length*sizeof(char)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1026:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). setZeroSSE(&(read.prediction[0]), num_flows_*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1027:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(&(read.prediction[0]), sv_PathPtr[MAX_PATHS]->pred, to_flow*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1389:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void TreephaserSSE::WindowedNormalize(BasecallerRead& read, int num_steps) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1412:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). median_set[median_set_size++] = read.raw_measurements[estim_flow] - sv_PathPtr[MAX_PATHS]->pred[estim_flow]; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1426:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd_NormMeasure[apply_flow] = read.raw_measurements[apply_flow] - normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1427:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction[apply_flow] = normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1433:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd_NormMeasure[apply_flow] = read.raw_measurements[apply_flow] - next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1434:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.additive_correction[apply_flow] = next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1468:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction[apply_flow] = normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1475:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.multiplicative_correction[apply_flow] = next_normalizer; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1484:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void TreephaserSSE::ComputeQVmetrics(BasecallerRead& read) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1488:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.state_inphase.assign(flow_order_.num_flows(), 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1489:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.state_total.assign(flow_order_.num_flows(), 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1491:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read.sequence.empty()) data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1494:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1494:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1495:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1495:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual.assign(read.sequence.size(), 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1516:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; base < (int)read.sequence.size() and read.sequence[base] == flow_order_[solution_flow]; ++base) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1516:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; base < (int)read.sequence.size() and read.sequence[base] == flow_order_[solution_flow]; ++base) { data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1585:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch[base] = -1; // min delta penalty to earlier base hypothesis data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1586:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual[base] = 0; data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1589:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_residual[base] = penalty[called_nuc] / (solution_flow - parent->window_start); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1595:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch[base] = max(read.penalty_mismatch[base], penalty_mismatch); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1595:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.penalty_mismatch[base] = max(read.penalty_mismatch[base], penalty_mismatch); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1604:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.state_inphase[solution_flow] = max(recent_state_inphase, 0.01f); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1605:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read.state_total[solution_flow] = max(recent_state_total, 0.01f); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1612:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). setZeroSSE(&read.prediction[0], num_flows_*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.cpp:1613:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). copySSE(&read.prediction[0], parent->pred, parent->window_end*sizeof(float)); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.h:99:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void SolveRead(BasecallerRead& read, int begin_flow, int end_flow); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.h:102:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void NormalizeAndSolve(BasecallerRead& read); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.h:133:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ComputeQVmetrics(BasecallerRead& read); data/tvc-5.0.3+git20151221.80e144e+dfsg/BaseCaller/TreephaserSSE.h:140:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void WindowedNormalize(BasecallerRead& read, int step); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:28:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c = fgetc (fp)) != EOF && c != '\n') data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:237: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). offset = strlen (buffer); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:263: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). string = (char *) malloc (strlen (filename) + bufsize + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:280:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen (HOME) + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:280:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen (HOME) + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:300:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen (ION_CONFIG) + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:300:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen (ION_CONFIG) + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:325: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). string = (char *) malloc (strlen (filename) + strlen (INSTALL) + strlen ("config") + 3); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:325:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen (INSTALL) + strlen ("config") + 3); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:325:68: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen (INSTALL) + strlen ("config") + 3); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:339: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). string = (char *) malloc (strlen (filename) + strlen ("/opt/ion/config") + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:339:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen ("/opt/ion/config") + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:353: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). string = (char *) malloc (strlen (filename) + strlen ("/opt/ion/alignTools") + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:353:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) malloc (strlen (filename) + strlen ("/opt/ion/alignTools") + 2); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:446:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fgetc (fp) == '\n') data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:455: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 (buf); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:473:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fileName = (char *) malloc (strlen (filePath) +strlen ("/processParameters.txt") +1); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:473:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fileName = (char *) malloc (strlen (filePath) +strlen ("/processParameters.txt") +1); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:492: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). keyword = (char *) calloc (1,strlen (buf)); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:493: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). argument = (char *) calloc (1,strlen (buf)); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:498:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (argument, aPtr, strlen (buf)-1); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:498: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). strncpy (argument, aPtr, strlen (buf)-1); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:499:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = aPtr + strlen (aPtr) - 1; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:503:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (keyword, buf, strlen (buf)-1); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:503: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). strncpy (keyword, buf, strlen (buf)-1); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:504: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). end = keyword + strlen (keyword) - 1; data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:513: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). arg = (char *) malloc (strlen (argument) +1); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:763:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filepath = (char *) malloc (sizeof (char) * (strlen (filename) + strlen (dir) + 2)); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:763:68: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filepath = (char *) malloc (sizeof (char) * (strlen (filename) + strlen (dir) + 2)); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:775:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filepath = (char *) malloc (sizeof (char) * (strlen (filename) + strlen (parent2) + 2)); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:775:68: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filepath = (char *) malloc (sizeof (char) * (strlen (filename) + strlen (parent2) + 2)); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:789:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filepath = (char *) malloc (sizeof (char) * (strlen (filename_thumbnail) + strlen (dir) + 2)); data/tvc-5.0.3+git20151221.80e144e+dfsg/Util/Utils.cpp:789:78: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filepath = (char *) malloc (sizeof (char) * (strlen (filename_thumbnail) + strlen (dir) + 2)); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.h:234:66: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void SolveRead(const int & flow_order_index, BasecallerRead& read, const int & begin_flow, const int & end_flow){ data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.h:237:61: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). treephaserSSE_vector.at(flow_order_index).SolveRead(read, begin_flow, end_flow); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/Bookkeeping/InputStructures.h:240:56: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dpTreephaser_vector.at(flow_order_index).Solve(read, end_flow, begin_flow); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:825:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void SetReferencePoint(BamAlignment& read) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:826:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). curChrom = read.RefID; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:827:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). curLeft = max(getSoftStart(read) - WINDOW_PREFIX, 0); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:837:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void map(BamAlignment& read) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:841:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!sample_manager->IdentifySample(read, sample, is_primary)) data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:845:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pre_buffer.push_back(read); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:852:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (curChrom == read.RefID) data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:853:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). delta = getSoftEnd(read) - curLeft - WINDOW_SIZE; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:861:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SetReferencePoint(read); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:880:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ReadsBuffer.push_back(read); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:881:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). AddCounts(read); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:988:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int strand = read.IsReverseStrand() ? 1 : 0; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:991:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!sample_manager->IdentifySample(read, sample, is_primary)) data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:994:56: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read_assem_start = assemStart - getSoftStart(read); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:999:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(int j = 0; j < (int)read.CigarData.size() && read_pos-read_assem_start < assemLength; ++j) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1000:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char cgo = read.CigarData[j].Type; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1001:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cgl = read.CigarData[j].Length; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1013:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int seqStop = min(stopPos, (int)read.QueryBases.length()); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1015:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(seqStart >= (int)read.QueryBases.length() || seqStart >= seqStop - KMER_LEN) data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1018:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). spectrum.add(read.QueryBases.substr(seqStart, seqStop - seqStart), strand, sample, is_primary); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1020:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (stopPos >= (int)read.QueryBases.length()) data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1353:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void AddCounts(BamAlignment& read) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1355:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int position_in_window = getSoftStart(read) - curLeft; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1363:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int strand = read.IsReverseStrand() ? 1 : 0; data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1366:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!sample_manager->IdentifySample(read, sample, is_primary)) data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1370:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (vector<CigarOp>::const_iterator cigar = read.CigarData.begin(); cigar != read.CigarData.end(); ++cigar) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/IndelAssembly/IndelAssembly.cpp:1370:83: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (vector<CigarOp>::const_iterator cigar = read.CigarData.begin(); cigar != read.CigarData.end(); ++cigar) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/ReferenceReader.h:56:16: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (5 != sscanf(line, "%1020s\t%ld\t%ld\t%d\t%d", chrom_name, &ref_entry.size, &chr_start, data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:228:14: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (5 != sscanf(line, "%1020s\t%ld\t%ld\t%d\t%d", chrom_name, &ref_entry.size, &chr_start, data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:249: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). if (line2[0] and line2[strlen(line2)-1] != '\n' and strlen(line2) == 65535) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:249:59: [1] (buffer) strlen: Does not handle 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 (line2[0] and line2[strlen(line2)-1] != '\n' and strlen(line2) == 65535) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:284: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). if (line2[0] and line2[strlen(line2)-1] != '\n' and strlen(line2) == 65535) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:284:59: [1] (buffer) strlen: Does not handle 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 (line2[0] and line2[strlen(line2)-1] != '\n' and strlen(line2) == 65535) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:404: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). if (line2[0] and line2[strlen(line2)-1] != '\n' and strlen(line2) == 65535) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/prepare_hotspots.cpp:404:59: [1] (buffer) strlen: Does not handle 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 (line2[0] and line2[strlen(line2)-1] != '\n' and strlen(line2) == 65535) { data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:690: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). corrected_name.reserve(strlen(name)); data/tvc-5.0.3+git20151221.80e144e+dfsg/VariantCaller/tvcutils/validate_bed.cpp:732: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 line_length = strlen(line); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:124:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *name = malloc(strlen(argv[optind]) + 5); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:137:15: [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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:157:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(argv[optind]); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/bgzip.c:174: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). name[strlen(name) - 3] = '\0'; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:449:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l += strlen(name[i]) + 1; data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:453: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). _bgzf_write(fp, name[i], strlen(name[i]) + 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:616: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(url); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:647: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 *fnidx = (char*)calloc(strlen(fn) + 5, 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:651: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 l = strlen(fnidx); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:702: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). fnidx = (char*)calloc(strlen(fn) + 5, 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/index.c:740: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(str); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:239: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). netwrite(ftp->ctrl_fd, cmd, strlen(cmd)); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:312: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:313: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). fp->retr = calloc(strlen(p) + 8, 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:315: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->size_cmd = calloc(strlen(p) + 8, 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:384: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.c:522:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). curr = read(fp->fd, buf + l, rest); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/knetfile.h:8: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.c:32: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.c:157: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). matches = ksBM_search(str, strlen(str), pat, strlen(pat), 0, &n); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.c:157:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). matches = ksBM_search(str, strlen(str), pat, strlen(pat), 0, &n); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.h:38:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s->s + s->l, p, l); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/kstring.h:46: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/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/main.c:173:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *fnidx = calloc(strlen(argv[optind]) + 5, 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/external/vcflib/tabixpp/tabix.cpp:9: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). char *fnidx = (char*) calloc(strlen(cfilename) + 5, 1); data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c:58: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 i = (int)strlen(str); data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c:169: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). len = strlen(readname); data/tvc-5.0.3+git20151221.80e144e+dfsg/file-io/ion_util.c:272: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). ion_run_to_readname(id, argv[i], strlen(argv[i])); ANALYSIS SUMMARY: Hits = 463 Lines analyzed = 39898 in approximately 1.04 seconds (38502 lines/second) Physical Source Lines of Code (SLOC) = 28036 Hits@level = [0] 498 [1] 262 [2] 154 [3] 7 [4] 39 [5] 1 Hits@level+ = [0+] 961 [1+] 463 [2+] 201 [3+] 47 [4+] 40 [5+] 1 Hits/KSLOC@level+ = [0+] 34.2774 [1+] 16.5145 [2+] 7.16935 [3+] 1.67642 [4+] 1.42674 [5+] 0.0356684 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.