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/sickle-1.33+git20150314.f3d6ae3/src/kseq.h Examining data/sickle-1.33+git20150314.f3d6ae3/src/print_record.c Examining data/sickle-1.33+git20150314.f3d6ae3/src/print_record.h Examining data/sickle-1.33+git20150314.f3d6ae3/src/sickle.c Examining data/sickle-1.33+git20150314.f3d6ae3/src/sickle.h Examining data/sickle-1.33+git20150314.f3d6ae3/src/sliding.c Examining data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c Examining data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c FINAL RESULTS: data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:135:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(infn1, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:140:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(infn2, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:145:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(infnc, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:160:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(outfn1, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:165:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(outfn2, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:170:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(outfnc, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:176:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(outfnc, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:182:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(sfn, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:90:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(infn, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:108:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(outfn, optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:124:16: [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. optc = getopt_long(argc, argv, "df:r:c:t:o:p:m:M:s:q:l:xng", paired_long_options, &option_index); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:79:16: [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. optc = getopt_long(argc, argv, "df:t:o:q:l:zxng", single_long_options, &option_index); data/sickle-1.33+git20150314.f3d6ae3/src/kseq.h:123:16: [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/sickle-1.33+git20150314.f3d6ae3/src/sickle.h:71:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char typenames[4][10] = { data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:186: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). paired_qual_threshold = atoi(optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:194: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). paired_length_threshold = atoi(optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:266:21: [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). combo = fopen(outfnc, "w"); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:316:24: [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). outfile1 = fopen(outfn1, "w"); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:322:24: [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). outfile2 = fopen(outfn2, "w"); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:346:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). single = fopen(sfn, "w"); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:112:37: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). single_qual_threshold = atoi(optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:120: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). single_length_threshold = atoi(optarg); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:177: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). outfile = fopen(outfn, "w"); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:134: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). infn1 = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:139: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). infn2 = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:144: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). infnc = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:159:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). outfn1 = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:164:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). outfn2 = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:169:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). outfnc = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:175:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). outfnc = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_paired.c:181:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sfn = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:89: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). infn = (char *) malloc(strlen(optarg) + 1); data/sickle-1.33+git20150314.f3d6ae3/src/trim_single.c:107: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). outfn = (char *) malloc(strlen(optarg) + 1); ANALYSIS SUMMARY: Hits = 33 Lines analyzed = 1325 in approximately 0.06 seconds (22958 lines/second) Physical Source Lines of Code (SLOC) = 1002 Hits@level = [0] 74 [1] 10 [2] 11 [3] 2 [4] 10 [5] 0 Hits@level+ = [0+] 107 [1+] 33 [2+] 23 [3+] 12 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 106.786 [1+] 32.9341 [2+] 22.9541 [3+] 11.976 [4+] 9.98004 [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.