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/prips-1.1.1/except.c Examining data/prips-1.1.1/except.h Examining data/prips-1.1.1/main.c Examining data/prips-1.1.1/prips.c Examining data/prips-1.1.1/prips.h FINAL RESULTS: data/prips-1.1.1/main.c:70:22: [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 ((ch = getopt(argc, argv, argstr)) != EOF) { data/prips-1.1.1/except.c:37:27: [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 set_exceptions(const char * const exp, int octet[4][256]) data/prips-1.1.1/except.c:40: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 buffer[4]; data/prips-1.1.1/except.c:56: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). octet[octind][excludeind] = atoi(buffer); data/prips-1.1.1/except.h:23:27: [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 set_exceptions(const char *exp, int octet[4][256]); data/prips-1.1.1/main.c:76:16: [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). delimiter = atoi(optarg); data/prips-1.1.1/main.c:88: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). if((increment = atoi(optarg)) < 1) data/prips-1.1.1/main.c:141: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). end = add_offset(prefix, atoi(offset)); data/prips-1.1.1/prips.c:56: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. static char buffer[INET_ADDRSTRLEN]; data/prips-1.1.1/prips.c:93: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. static char buffer[BUF_SIZE]; data/prips-1.1.1/except.c:43:24: [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(size_t i = 0; i < strlen(exp) + 1; i++) ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 604 in approximately 0.03 seconds (21729 lines/second) Physical Source Lines of Code (SLOC) = 378 Hits@level = [0] 6 [1] 1 [2] 9 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 17 [1+] 11 [2+] 10 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 44.9735 [1+] 29.1005 [2+] 26.455 [3+] 2.6455 [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.