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/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h FINAL RESULTS: data/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h:214:11: [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. len = vsnprintf(buf, sizeof buf, fmt, ap); data/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h:204: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[SPT_MAXTITLE + 1]; // Use buffer in case argv[0] is passed. data/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h:232:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(SPT.base, buf, len); data/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h:124:12: [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). ptr -= strlen(arg0); data/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h:156:15: [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). nul = &base[strlen(base)]; data/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h:163: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). end = argv[i] + strlen(argv[i]) + 1; data/golang-github-erikdubbelboer-gspt-0.0~git20161002.0.6ce3e9d/setproctitle.h:170: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). end = envp[i] + strlen(envp[i]) + 1; ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 270 in approximately 0.03 seconds (9451 lines/second) Physical Source Lines of Code (SLOC) = 167 Hits@level = [0] 1 [1] 4 [2] 2 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 8 [1+] 7 [2+] 3 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 47.9042 [1+] 41.9162 [2+] 17.9641 [3+] 5.98802 [4+] 5.98802 [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.