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/ascii-3.18/ascii.c FINAL RESULTS: data/ascii-3.18/ascii.c:382:13: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(rep, "1", sizeof(rep)); data/ascii-3.18/ascii.c:384:13: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(rep, "0", sizeof(rep)); data/ascii-3.18/ascii.c:82:16: [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( (op=getopt(argc, argv, opt_string)) != -1) { data/ascii-3.18/ascii.c:125:12: [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 char rep[BITSPERCHAR + 1]; data/ascii-3.18/ascii.c:344: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 canbuf[BUFSIZ], *ep; data/ascii-3.18/ascii.c:373:12: [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 char rep[9]; data/ascii-3.18/ascii.c:179: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). for (; strlen(*ptr) < 4 && isupper(**ptr); ptr++) data/ascii-3.18/ascii.c:223:18: [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). size_t len = strlen(str); data/ascii-3.18/ascii.c:355: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). ep = canbuf + strlen(canbuf) - 4; data/ascii-3.18/ascii.c:360: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). while (canbuf[strlen(canbuf) - 1] == ' ') data/ascii-3.18/ascii.c:361: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). canbuf[strlen(canbuf) - 1] = '\0'; data/ascii-3.18/ascii.c:407: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). len = strlen(name); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 441 in approximately 0.02 seconds (19614 lines/second) Physical Source Lines of Code (SLOC) = 340 Hits@level = [0] 34 [1] 6 [2] 3 [3] 1 [4] 0 [5] 2 Hits@level+ = [0+] 46 [1+] 12 [2+] 6 [3+] 3 [4+] 2 [5+] 2 Hits/KSLOC@level+ = [0+] 135.294 [1+] 35.2941 [2+] 17.6471 [3+] 8.82353 [4+] 5.88235 [5+] 5.88235 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.