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/libsmithwaterman-0.0+git20160702.2610e25/BandedSmithWaterman.cpp Examining data/libsmithwaterman-0.0+git20160702.2610e25/BandedSmithWaterman.h Examining data/libsmithwaterman-0.0+git20160702.2610e25/IndelAllele.cpp Examining data/libsmithwaterman-0.0+git20160702.2610e25/IndelAllele.h Examining data/libsmithwaterman-0.0+git20160702.2610e25/LeftAlign.cpp Examining data/libsmithwaterman-0.0+git20160702.2610e25/LeftAlign.h Examining data/libsmithwaterman-0.0+git20160702.2610e25/Mosaik.h Examining data/libsmithwaterman-0.0+git20160702.2610e25/Repeats.cpp Examining data/libsmithwaterman-0.0+git20160702.2610e25/Repeats.h Examining data/libsmithwaterman-0.0+git20160702.2610e25/SWMain.cpp Examining data/libsmithwaterman-0.0+git20160702.2610e25/SmithWatermanGotoh.cpp Examining data/libsmithwaterman-0.0+git20160702.2610e25/SmithWatermanGotoh.h Examining data/libsmithwaterman-0.0+git20160702.2610e25/convert.h Examining data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp FINAL RESULTS: data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:110:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, "hpRzm:n:g:r:e:b:r:", data/libsmithwaterman-0.0+git20160702.2610e25/LeftAlign.cpp:830:43: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if 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/libsmithwaterman-0.0+git20160702.2610e25/LeftAlign.cpp:840:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cigar.push_back(make_pair(atoi(number.c_str()), type)); data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:158:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bandwidth = atoi(optarg); data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:241: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). len = atoi(slen.c_str()); data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:246: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). len = atoi(slen.c_str()); data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:252: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). len = atoi(slen.c_str()); data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:258: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). len = atoi(slen.c_str()); data/libsmithwaterman-0.0+git20160702.2610e25/BandedSmithWaterman.cpp:618: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). const unsigned int alLength = strlen(mReversedAnchor); data/libsmithwaterman-0.0+git20160702.2610e25/SWMain.cpp:67:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int referenceLen = strlen(pReference); data/libsmithwaterman-0.0+git20160702.2610e25/SWMain.cpp:68:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const unsigned int queryLen = strlen(pQuery); data/libsmithwaterman-0.0+git20160702.2610e25/SmithWatermanGotoh.cpp:487: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). unsigned int alLength = strlen(mReversedAnchor); data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:15:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). string reverseComplement(string read) { data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:21:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc_read.assign(read.rbegin(), read.rend()); data/libsmithwaterman-0.0+git20160702.2610e25/smithwaterman.cpp:21:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc_read.assign(read.rbegin(), read.rend()); ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 3213 in approximately 0.09 seconds (36541 lines/second) Physical Source Lines of Code (SLOC) = 2115 Hits@level = [0] 13 [1] 7 [2] 7 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 28 [1+] 15 [2+] 8 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 13.2388 [1+] 7.0922 [2+] 3.78251 [3+] 0.472813 [4+] 0 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.