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/cclive-0.9.3/src/cc/curl.cpp Examining data/cclive-0.9.3/src/cc/wait.cpp Examining data/cclive-0.9.3/src/cc/file.cpp Examining data/cclive-0.9.3/src/cc/util.h Examining data/cclive-0.9.3/src/cc/progressbar.h Examining data/cclive-0.9.3/src/cc/re.cpp Examining data/cclive-0.9.3/src/cc/file.h Examining data/cclive-0.9.3/src/cc/input.h Examining data/cclive-0.9.3/src/cc/exec.cpp Examining data/cclive-0.9.3/src/cc/application.h Examining data/cclive-0.9.3/src/cc/get.cpp Examining data/cclive-0.9.3/src/cc/re.h Examining data/cclive-0.9.3/src/cc/main.cpp Examining data/cclive-0.9.3/src/cc/var.h Examining data/cclive-0.9.3/src/cc/log.h Examining data/cclive-0.9.3/src/cc/fstream.h Examining data/cclive-0.9.3/src/cc/background.cpp Examining data/cclive-0.9.3/src/cc/application.cpp Examining data/cclive-0.9.3/src/cc/internal.h Examining data/cclive-0.9.3/src/cc/error.h Examining data/cclive-0.9.3/src/cc/options.h Examining data/cclive-0.9.3/src/cc/sig.h Examining data/cclive-0.9.3/src/cc/error.cpp Examining data/cclive-0.9.3/src/compat/media_pt9.cpp Examining data/cclive-0.9.3/src/compat/util.h Examining data/cclive-0.9.3/src/compat/media_pt4.cpp Examining data/cclive-0.9.3/src/compat/query.h Examining data/cclive-0.9.3/src/compat/query_pt4.cpp Examining data/cclive-0.9.3/src/compat/error_pt4.cpp Examining data/cclive-0.9.3/src/compat/query_pt9.cpp Examining data/cclive-0.9.3/src/compat/error.h Examining data/cclive-0.9.3/src/compat/options.h Examining data/cclive-0.9.3/src/compat/util.cpp Examining data/cclive-0.9.3/src/compat/media.h Examining data/cclive-0.9.3/src/compat/error_pt9.cpp FINAL RESULTS: data/cclive-0.9.3/src/cc/exec.cpp:72:7: [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(argv[0], (char **)argv); data/cclive-0.9.3/src/cc/fstream.h:66:12: [4] (shell) system: 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. boost::system::error_code ec; // Throw nothing. data/cclive-0.9.3/src/cc/fstream.h:106:12: [4] (shell) system: 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. boost::system::error_code ec; data/cclive-0.9.3/src/cc/options.h:392:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *h = getenv("HOME"); data/cclive-0.9.3/src/cc/error.cpp:38: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 buf[256]; data/cclive-0.9.3/src/cc/error.h:42: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 buf[256]; data/cclive-0.9.3/src/cc/internal.h:63:13: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. #define vfork fork data/cclive-0.9.3/src/cc/log.h:128:8: [2] (misc) open: 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). _s.open(_fpath.c_str(), _mode); data/cclive-0.9.3/src/cc/background.cpp:69:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/cclive-0.9.3/src/cc/fstream.h:76:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static inline std::string read(const std::string& fpath) data/cclive-0.9.3/src/cc/input.h:110:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extract_uris(dst, cc::fstream::read(r)); data/cclive-0.9.3/src/cc/input.h:126:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extract_uris(dst, cc::fstream::read(s)); data/cclive-0.9.3/src/cc/log.h:96:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline std::streamsize read(char_type *t, std::streamsize n) data/cclive-0.9.3/src/cc/log.h:98:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _s.read(t, n); data/cclive-0.9.3/src/cc/options.h:393:14: [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). if (h && strlen(h) >0) data/cclive-0.9.3/src/compat/media_pt4.cpp:34:7: [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). if (strlen(s) >0) data/cclive-0.9.3/src/compat/media_pt9.cpp:34:20: [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). if (s != NULL && strlen(s) >0) data/cclive-0.9.3/src/compat/media_pt9.cpp:47:20: [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). if (s != NULL && strlen(s) >0) data/cclive-0.9.3/src/compat/query_pt9.cpp:77: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). if (strlen(id) >0) ANALYSIS SUMMARY: Hits = 19 Lines analyzed = 4677 in approximately 0.14 seconds (33239 lines/second) Physical Source Lines of Code (SLOC) = 3198 Hits@level = [0] 0 [1] 11 [2] 4 [3] 1 [4] 3 [5] 0 Hits@level+ = [0+] 19 [1+] 19 [2+] 8 [3+] 4 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 5.94121 [1+] 5.94121 [2+] 2.50156 [3+] 1.25078 [4+] 0.938086 [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.