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/scalc-0.2.4/tests/test.cc Examining data/scalc-0.2.4/tests/scalc_test_suite.cc Examining data/scalc-0.2.4/lib/const.cc Examining data/scalc-0.2.4/lib/neg.cc Examining data/scalc-0.2.4/lib/ids.cc Examining data/scalc-0.2.4/lib/operators.cc Examining data/scalc-0.2.4/lib/funcalls.cc Examining data/scalc-0.2.4/lib/syntax.cc Examining data/scalc-0.2.4/lib/parse.cc Examining data/scalc-0.2.4/lib/calc.cc Examining data/scalc-0.2.4/lib/expression.cc Examining data/scalc-0.2.4/lib/functions.cc Examining data/scalc-0.2.4/lib/session.cc Examining data/scalc-0.2.4/lib/subgroups.cc FINAL RESULTS: data/scalc-0.2.4/lib/calc.cc:655:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/scalc-0.2.4/lib/calc.cc:965:7: [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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/scalc-0.2.4/lib/calc.cc:982:7: [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 yyformat[sizeof yyunexpected data/scalc-0.2.4/lib/calc.cc:1188:3: [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 yymsgbuf[128]; data/scalc-0.2.4/lib/calc.cc:1518:7: [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 buf[20]; data/scalc-0.2.4/lib/calc.cc:846:21: [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). # define yystrlen strlen data/scalc-0.2.4/lib/parse.cc:484:36: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = yyget_extra(yyscanner)->getc(); \ data/scalc-0.2.4/lib/parse.cc:634:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/scalc-0.2.4/lib/parse.cc:806:22: [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). loc->last_column+= strlen(yytext); data/scalc-0.2.4/lib/parse.cc:831:22: [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). loc->last_column+= strlen(yytext); data/scalc-0.2.4/lib/parse.cc:1613: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). return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); data/scalc-0.2.4/lib/parse.cc:2012:11: [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(str); data/scalc-0.2.4/lib/parse.cc:2028:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int Scanner::getc() ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 5420 in approximately 0.15 seconds (35689 lines/second) Physical Source Lines of Code (SLOC) = 3579 Hits@level = [0] 4 [1] 8 [2] 4 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 17 [1+] 13 [2+] 5 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 4.74993 [1+] 3.6323 [2+] 1.39704 [3+] 0.279408 [4+] 0.279408 [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.