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/hp48cc-1.3/acconfig.h Examining data/hp48cc-1.3/lib/err.c Examining data/hp48cc-1.3/lib/err.h Examining data/hp48cc-1.3/lib/xmalloc.c Examining data/hp48cc-1.3/lib/xrealloc.c Examining data/hp48cc-1.3/lib/xstrdup.c Examining data/hp48cc-1.3/src/hp48cc.c Examining data/hp48cc-1.3/version.h FINAL RESULTS: data/hp48cc-1.3/lib/err.c:57:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/hp48cc-1.3/lib/err.c:78:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/hp48cc-1.3/lib/err.c:99:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/hp48cc-1.3/lib/err.c:118:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/hp48cc-1.3/lib/xstrdup.c:10:12: [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). return strcpy(xmalloc(strlen(s) + 1), s); data/hp48cc-1.3/src/hp48cc.c:53:14: [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 ((c = getopt(argc, argv, "o:V")) != -1) data/hp48cc-1.3/src/hp48cc.c:20:15: [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). if ((yyin = fopen(filename, "r")) == NULL) data/hp48cc-1.3/src/hp48cc.c:58:23: [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). if ((output_file = fopen(optarg, "w")) == NULL) data/hp48cc-1.3/lib/xstrdup.c:10:27: [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 strcpy(xmalloc(strlen(s) + 1), s); ANALYSIS SUMMARY: Hits = 9 Lines analyzed = 310 in approximately 0.03 seconds (9746 lines/second) Physical Source Lines of Code (SLOC) = 184 Hits@level = [0] 10 [1] 1 [2] 2 [3] 1 [4] 5 [5] 0 Hits@level+ = [0+] 19 [1+] 9 [2+] 8 [3+] 6 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 103.261 [1+] 48.913 [2+] 43.4783 [3+] 32.6087 [4+] 27.1739 [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.