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/install-mimic-0.4.0/install-mimic.c FINAL RESULTS: data/install-mimic-0.4.0/install-mimic.c:44:50: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define __printflike(x, y) __attribute__((format(printf, (x), (y)))) data/install-mimic-0.4.0/install-mimic.c:85:16: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. const int n = vsnprintf(buf, sz, fmt, v); data/install-mimic-0.4.0/install-mimic.c:146:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp("install", (char * const *)cmd); data/install-mimic-0.4.0/install-mimic.c:173: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 (ch = getopt(argc, argv, "hr:Vv-:"), ch != -1) data/install-mimic-0.4.0/install-mimic.c:131: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 owner[20], group[20], mode[6]; data/install-mimic-0.4.0/install-mimic.c:222:31: [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). const size_t last_dir_len = strlen(last_dir); data/install-mimic-0.4.0/install-mimic.c:231: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). const size_t sz = strlen(src) + 1; data/install-mimic-0.4.0/install-mimic.c:239:8: [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). strlen(base) + 1; ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 256 in approximately 0.05 seconds (5472 lines/second) Physical Source Lines of Code (SLOC) = 200 Hits@level = [0] 2 [1] 3 [2] 1 [3] 1 [4] 3 [5] 0 Hits@level+ = [0+] 10 [1+] 8 [2+] 5 [3+] 4 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 50 [1+] 40 [2+] 25 [3+] 20 [4+] 15 [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.