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/boolstuff-0.1.16/src/boolstuff/c-api.h Examining data/boolstuff-0.1.16/src/boolstuff/checkdnf.cpp Examining data/boolstuff-0.1.16/src/boolstuff/c-api.cpp Examining data/boolstuff-0.1.16/src/boolstuff/BoolExprParser.h Examining data/boolstuff-0.1.16/src/boolstuff/BoolExpr.cpp Examining data/boolstuff-0.1.16/src/boolstuff/BoolExprParser.cpp Examining data/boolstuff-0.1.16/src/boolstuff/checkc.c Examining data/boolstuff-0.1.16/src/boolstuff/BoolExpr.h Examining data/boolstuff-0.1.16/src/commands/booldnf.cpp Examining data/boolstuff-0.1.16/examples/non-string-nodes.cpp Examining data/boolstuff-0.1.16/examples/c-example.c Examining data/boolstuff-0.1.16/examples/example.cpp FINAL RESULTS: data/boolstuff-0.1.16/src/commands/booldnf.cpp:98: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, "", knownOptions, NULL); data/boolstuff-0.1.16/examples/c-example.c:24: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[512]; data/boolstuff-0.1.16/src/boolstuff/BoolExprParser.cpp:176:52: [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 strncmp(curInput.c_str() + curIndex, s, strlen(s)) == 0; data/boolstuff-0.1.16/src/boolstuff/BoolExprParser.cpp:183:17: [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). curIndex += strlen(s); ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 3362 in approximately 0.08 seconds (40347 lines/second) Physical Source Lines of Code (SLOC) = 1936 Hits@level = [0] 44 [1] 2 [2] 1 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 48 [1+] 4 [2+] 2 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 24.7934 [1+] 2.06612 [2+] 1.03306 [3+] 0.516529 [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.