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/pamix-1.6~git20180112.ea4ab3b/include/configuration.hpp Examining data/pamix-1.6~git20180112.ea4ab3b/include/entry.hpp Examining data/pamix-1.6~git20180112.ea4ab3b/include/painterface.hpp Examining data/pamix-1.6~git20180112.ea4ab3b/include/pamix.hpp Examining data/pamix-1.6~git20180112.ea4ab3b/include/pamix_functions.hpp Examining data/pamix-1.6~git20180112.ea4ab3b/include/pamix_ui.hpp Examining data/pamix-1.6~git20180112.ea4ab3b/include/volumeutil.hpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/cardentry.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/configuration.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/entry.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/painterface.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/pamix.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/pamix_functions.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/pamix_ui.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/sinkentry.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/sinkinputentry.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/sourceentry.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/sourceoutputentry.cpp Examining data/pamix-1.6~git20180112.ea4ab3b/src/volumeutil.cpp FINAL RESULTS: data/pamix-1.6~git20180112.ea4ab3b/src/pamix.cpp:120:15: [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. char *home = getenv("HOME"); data/pamix-1.6~git20180112.ea4ab3b/src/pamix.cpp:121:26: [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. char *xdg_config_home = getenv("XDG_CONFIG_HOME"); data/pamix-1.6~git20180112.ea4ab3b/src/pamix.cpp:131:26: [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. char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS"); data/pamix-1.6~git20180112.ea4ab3b/src/configuration.cpp:113: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). FILE *file = fopen(path.c_str(), "r"); data/pamix-1.6~git20180112.ea4ab3b/src/painterface.cpp:367: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 t[16]; data/pamix-1.6~git20180112.ea4ab3b/src/configuration.cpp:129:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read != length) data/pamix-1.6~git20180112.ea4ab3b/src/pamix.cpp:92:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 2255 in approximately 0.07 seconds (33887 lines/second) Physical Source Lines of Code (SLOC) = 1735 Hits@level = [0] 9 [1] 2 [2] 2 [3] 3 [4] 0 [5] 0 Hits@level+ = [0+] 16 [1+] 7 [2+] 5 [3+] 3 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 9.2219 [1+] 4.03458 [2+] 2.88184 [3+] 1.72911 [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.