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/patchage-1.0.0~dfsg0/src/AlsaDriver.hpp
Examining data/patchage-1.0.0~dfsg0/src/PatchagePort.hpp
Examining data/patchage-1.0.0~dfsg0/src/main.cpp
Examining data/patchage-1.0.0~dfsg0/src/Configuration.hpp
Examining data/patchage-1.0.0~dfsg0/src/Widget.hpp
Examining data/patchage-1.0.0~dfsg0/src/JackDriver.cpp
Examining data/patchage-1.0.0~dfsg0/src/Patchage.cpp
Examining data/patchage-1.0.0~dfsg0/src/JackDbusDriver.cpp
Examining data/patchage-1.0.0~dfsg0/src/JackDriver.hpp
Examining data/patchage-1.0.0~dfsg0/src/Configuration.cpp
Examining data/patchage-1.0.0~dfsg0/src/PatchageModule.hpp
Examining data/patchage-1.0.0~dfsg0/src/binary_location.h
Examining data/patchage-1.0.0~dfsg0/src/Queue.hpp
Examining data/patchage-1.0.0~dfsg0/src/PatchageEvent.hpp
Examining data/patchage-1.0.0~dfsg0/src/Patchage.hpp
Examining data/patchage-1.0.0~dfsg0/src/JackDbusDriver.hpp
Examining data/patchage-1.0.0~dfsg0/src/Legend.hpp
Examining data/patchage-1.0.0~dfsg0/src/PatchageCanvas.cpp
Examining data/patchage-1.0.0~dfsg0/src/PatchageEvent.cpp
Examining data/patchage-1.0.0~dfsg0/src/PortID.hpp
Examining data/patchage-1.0.0~dfsg0/src/AlsaDriver.cpp
Examining data/patchage-1.0.0~dfsg0/src/Driver.hpp
Examining data/patchage-1.0.0~dfsg0/src/PatchageCanvas.hpp
Examining data/patchage-1.0.0~dfsg0/src/UIFile.hpp
Examining data/patchage-1.0.0~dfsg0/src/PatchageModule.cpp

FINAL RESULTS:

data/patchage-1.0.0~dfsg0/src/Patchage.cpp:585:6:  [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.
	if (system("./jack-session") < 0) {
data/patchage-1.0.0~dfsg0/src/Configuration.cpp:124: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* xdg_config_home = getenv("XDG_CONFIG_HOME");
data/patchage-1.0.0~dfsg0/src/Configuration.cpp:125: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* home            = getenv("HOME");
data/patchage-1.0.0~dfsg0/src/binary_location.h:36:8:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		if (!realpath(dli.dli_fname, bin_loc)) {
data/patchage-1.0.0~dfsg0/src/main.cpp:52:23:  [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* path_c = getenv("PATH");
data/patchage-1.0.0~dfsg0/src/Configuration.cpp:152: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).
		file.open(filenames[i].c_str(), std::ios::in);
data/patchage-1.0.0~dfsg0/src/Configuration.cpp:267: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).
		file.open(filenames[i].c_str(), std::ios::out);
data/patchage-1.0.0~dfsg0/src/Patchage.cpp:81:17:  [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).
	: _xml(UIFile::open("patchage"))
data/patchage-1.0.0~dfsg0/src/Patchage.cpp:426: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[8];
data/patchage-1.0.0~dfsg0/src/UIFile.hpp:41:36:  [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).
	static Glib::RefPtr<Gtk::Builder> open(const std::string& base_name) {

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 5643 in approximately 0.13 seconds (43567 lines/second)
Physical Source Lines of Code (SLOC) = 4171
Hits@level = [0]   1 [1]   0 [2]   5 [3]   4 [4]   1 [5]   0
Hits@level+ = [0+]  11 [1+]  10 [2+]  10 [3+]   5 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 2.63726 [1+] 2.39751 [2+] 2.39751 [3+] 1.19875 [4+] 0.239751 [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.