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/slurp-1.3.1/include/pool-buffer.h Examining data/slurp-1.3.1/include/render.h Examining data/slurp-1.3.1/include/slurp.h Examining data/slurp-1.3.1/main.c Examining data/slurp-1.3.1/pool-buffer.c Examining data/slurp-1.3.1/render.c FINAL RESULTS: data/slurp-1.3.1/main.c:766:16: [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 ((opt = getopt(argc, argv, "hdb:c:s:B:w:prof:")) != -1) { data/slurp-1.3.1/main.c:874:29: [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 *cursor_theme = getenv("XCURSOR_THEME"); data/slurp-1.3.1/main.c:875:32: [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 *cursor_size_str = getenv("XCURSOR_SIZE"); data/slurp-1.3.1/render.c:82:4: [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 dimensions[12]; data/slurp-1.3.1/main.c:661: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). int len = strlen(color); data/slurp-1.3.1/main.c:668:6: [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(color) == 6) { data/slurp-1.3.1/pool-buffer.c:29:19: [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). randname(name + strlen(name) - 6); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 1381 in approximately 0.06 seconds (21504 lines/second) Physical Source Lines of Code (SLOC) = 1163 Hits@level = [0] 32 [1] 3 [2] 1 [3] 3 [4] 0 [5] 0 Hits@level+ = [0+] 39 [1+] 7 [2+] 4 [3+] 3 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 33.534 [1+] 6.01892 [2+] 3.43938 [3+] 2.57954 [4+] 0 [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.