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/qjackctl-0.6.3/src/qjackctlJackGraph.h Examining data/qjackctl-0.6.3/src/qjackctlJackConnect.h Examining data/qjackctl-0.6.3/src/qjackctlPatchbayFile.cpp Examining data/qjackctl-0.6.3/src/qjackctlPatchbayRack.cpp Examining data/qjackctl-0.6.3/src/qjackctlPaletteForm.h Examining data/qjackctl-0.6.3/src/qjackctlConnectionsForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlGraphForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlSession.h Examining data/qjackctl-0.6.3/src/qjackctlSetupForm.h Examining data/qjackctl-0.6.3/src/qjackctlPatchbayRack.h Examining data/qjackctl-0.6.3/src/qjackctlAliases.h Examining data/qjackctl-0.6.3/src/qjackctlGraph.h Examining data/qjackctl-0.6.3/src/qjackctlSystemTray.h Examining data/qjackctl-0.6.3/src/qjackctlConnect.cpp Examining data/qjackctl-0.6.3/src/qjackctlSetup.cpp Examining data/qjackctl-0.6.3/src/qjackctlAlsaConnect.h Examining data/qjackctl-0.6.3/src/qjackctlMessagesStatusForm.h Examining data/qjackctl-0.6.3/src/qjackctlAlsaConnect.cpp Examining data/qjackctl-0.6.3/src/qjackctlSocketForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlGraphCommand.cpp Examining data/qjackctl-0.6.3/src/qjackctlPatchbay.h Examining data/qjackctl-0.6.3/src/qjackctlAboutForm.h Examining data/qjackctl-0.6.3/src/qjackctlMainForm.h Examining data/qjackctl-0.6.3/src/qjackctlPatchbay.cpp Examining data/qjackctl-0.6.3/src/qjackctlConnect.h Examining data/qjackctl-0.6.3/src/qjackctlPatchbayForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlInterfaceComboBox.h Examining data/qjackctl-0.6.3/src/qjackctl.h Examining data/qjackctl-0.6.3/src/qjackctlAbout.h Examining data/qjackctl-0.6.3/src/qjackctlSessionForm.h Examining data/qjackctl-0.6.3/src/qjackctlMainForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlAlsaGraph.cpp Examining data/qjackctl-0.6.3/src/qjackctlStatus.h Examining data/qjackctl-0.6.3/src/qjackctlGraph.cpp Examining data/qjackctl-0.6.3/src/qjackctlPatchbayForm.h Examining data/qjackctl-0.6.3/src/qjackctlPatchbayFile.h Examining data/qjackctl-0.6.3/src/qjackctlSocketForm.h Examining data/qjackctl-0.6.3/src/qjackctlPaletteForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlSessionForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlInterfaceComboBox.cpp Examining data/qjackctl-0.6.3/src/qjackctlGraphForm.h Examining data/qjackctl-0.6.3/src/qjackctlSystemTray.cpp Examining data/qjackctl-0.6.3/src/qjackctlSetupForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlMessagesStatusForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlAlsaGraph.h Examining data/qjackctl-0.6.3/src/qjackctlSetup.h Examining data/qjackctl-0.6.3/src/qjackctlAliases.cpp Examining data/qjackctl-0.6.3/src/qjackctlSession.cpp Examining data/qjackctl-0.6.3/src/qjackctlGraphCommand.h Examining data/qjackctl-0.6.3/src/qjackctlJackConnect.cpp Examining data/qjackctl-0.6.3/src/qjackctlConnectionsForm.h Examining data/qjackctl-0.6.3/src/qjackctl.cpp Examining data/qjackctl-0.6.3/src/qjackctlAboutForm.cpp Examining data/qjackctl-0.6.3/src/qjackctlJackGraph.cpp FINAL RESULTS: data/qjackctl-0.6.3/src/qjackctl.cpp:473:2: [4] (format) snprintf: 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. snprintf(cmd, sizeof(cmd), format, (int) getpid()); data/qjackctl-0.6.3/src/qjackctl.cpp:483:3: [4] (shell) execl: 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. execl(shell, shell, "-c", cmd, nullptr); data/qjackctl-0.6.3/src/qjackctl.cpp:539:9: [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. = ::system(setup.sCmdLine.toUtf8().constData()); data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:1196:5: [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. ::system(sTemp.toUtf8().constData())); data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:2483:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sTemp.sprintf("%02u:%02u:%02u.%03u", data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:3579:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. QString().sprintf("%u.%u.%03u", tpos.bar, tpos.beat, tpos.tick)); data/qjackctl-0.6.3/src/qjackctl.cpp:208:34: [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 *pszServerName = ::getenv("JACK_DEFAULT_SERVER"); data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:1258:33: [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 *pszServerName = ::getenv("JACK_DEFAULT_SERVER"); data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:1327:45: [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 QString sPath = QString::fromUtf8(::getenv("PATH")); data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:3086: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. = QString::fromUtf8(::getenv("HOME")) data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:3860: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. sTitle = QString::fromUtf8(::getenv("JACK_DEFAULT_SERVER")); data/qjackctl-0.6.3/src/qjackctl.cpp:217: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 szHostName[255]; data/qjackctl-0.6.3/src/qjackctl.cpp:464: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 cmd[80]; data/qjackctl-0.6.3/src/qjackctlInterfaceComboBox.cpp:340:12: [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). if (file.open(QIODevice::ReadOnly)) { data/qjackctl-0.6.3/src/qjackctlInterfaceComboBox.cpp:361:12: [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). if (file.open(QIODevice::ReadOnly)) { data/qjackctl-0.6.3/src/qjackctlInterfaceComboBox.cpp:403:5: [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 coreDeviceName[256]; data/qjackctl-0.6.3/src/qjackctlInterfaceComboBox.cpp:414:8: [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 drivername[128]; data/qjackctl-0.6.3/src/qjackctlJackConnect.cpp:340: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 *aliases[2]; data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:350:5: [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 achBuffer[1024]; data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:364:13: [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). if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:1913: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 achBuffer[1024]; data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:3089:12: [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). if (file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { data/qjackctl-0.6.3/src/qjackctlMessagesStatusForm.cpp:232:23: [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). if (m_pMessagesLog->open(QIODevice::Text | QIODevice::Append)) { data/qjackctl-0.6.3/src/qjackctlPatchbayFile.cpp:118:12: [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). if (!file.open(QIODevice::ReadOnly)) data/qjackctl-0.6.3/src/qjackctlPatchbayFile.cpp:283:12: [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). if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) data/qjackctl-0.6.3/src/qjackctlSession.cpp:381:12: [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). if (!file.open(QIODevice::ReadOnly)) data/qjackctl-0.6.3/src/qjackctlSession.cpp:513:12: [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). if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) data/qjackctl-0.6.3/src/qjackctl.cpp:397:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const QByteArray data = pSocket->read(nread); data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:1882:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (::read(g_fdSigterm[1], &c, sizeof(c)) > 0) data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:1915:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cchRead = ::read(fd, achBuffer, cchBuffer); data/qjackctl-0.6.3/src/qjackctlMainForm.cpp:1919:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cchRead = (bBlock ? 0 : ::read(fd, achBuffer, cchBuffer)); ANALYSIS SUMMARY: Hits = 31 Lines analyzed = 32433 in approximately 0.58 seconds (55758 lines/second) Physical Source Lines of Code (SLOC) = 22739 Hits@level = [0] 0 [1] 4 [2] 16 [3] 5 [4] 6 [5] 0 Hits@level+ = [0+] 31 [1+] 31 [2+] 27 [3+] 11 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 1.3633 [1+] 1.3633 [2+] 1.18739 [3+] 0.48375 [4+] 0.263864 [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.