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/qsampler-0.6.3/src/qsamplerChannelForm.h Examining data/qsampler-0.6.3/src/qsamplerChannel.cpp Examining data/qsampler-0.6.3/src/qsamplerFxSend.cpp Examining data/qsampler-0.6.3/src/qsamplerPaletteForm.cpp Examining data/qsampler-0.6.3/src/qsamplerDeviceStatusForm.cpp Examining data/qsampler-0.6.3/src/qsamplerInstrumentList.cpp Examining data/qsampler-0.6.3/src/qsamplerInstrument.cpp Examining data/qsampler-0.6.3/src/qsamplerOptions.h Examining data/qsampler-0.6.3/src/qsamplerChannelFxForm.cpp Examining data/qsampler-0.6.3/src/qsamplerOptionsForm.cpp Examining data/qsampler-0.6.3/src/qsamplerFxSendsModel.h Examining data/qsampler-0.6.3/src/qsamplerDevice.cpp Examining data/qsampler-0.6.3/src/qsamplerChannelStrip.h Examining data/qsampler-0.6.3/src/qsamplerPaletteForm.h Examining data/qsampler-0.6.3/src/qsamplerDevice.h Examining data/qsampler-0.6.3/src/qsamplerInstrumentListForm.cpp Examining data/qsampler-0.6.3/src/qsamplerInstrumentList.h Examining data/qsampler-0.6.3/src/qsamplerChannelFxForm.h Examining data/qsampler-0.6.3/src/qsampler.cpp Examining data/qsampler-0.6.3/src/qsamplerMessages.cpp Examining data/qsampler-0.6.3/src/qsamplerOptionsForm.h Examining data/qsampler-0.6.3/src/qsamplerFxSend.h Examining data/qsampler-0.6.3/src/qsamplerDeviceForm.h Examining data/qsampler-0.6.3/src/qsamplerDeviceForm.cpp Examining data/qsampler-0.6.3/src/qsamplerChannelStrip.cpp Examining data/qsampler-0.6.3/src/qsamplerInstrument.h Examining data/qsampler-0.6.3/src/qsamplerMainForm.h Examining data/qsampler-0.6.3/src/qsamplerInstrumentForm.cpp Examining data/qsampler-0.6.3/src/qsamplerInstrumentListForm.h Examining data/qsampler-0.6.3/src/qsamplerAbout.h Examining data/qsampler-0.6.3/src/qsampler.h Examining data/qsampler-0.6.3/src/qsamplerMainForm.cpp Examining data/qsampler-0.6.3/src/qsamplerUtilities.cpp Examining data/qsampler-0.6.3/src/qsamplerFxSendsModel.cpp Examining data/qsampler-0.6.3/src/qsamplerChannelForm.cpp Examining data/qsampler-0.6.3/src/qsamplerDeviceStatusForm.h Examining data/qsampler-0.6.3/src/qsamplerMessages.h Examining data/qsampler-0.6.3/src/qsamplerInstrumentForm.h Examining data/qsampler-0.6.3/src/qsamplerOptions.cpp Examining data/qsampler-0.6.3/src/qsamplerChannel.h Examining data/qsampler-0.6.3/src/qsamplerUtilities.h FINAL RESULTS: data/qsampler-0.6.3/src/qsampler.cpp:439: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/qsampler-0.6.3/src/qsampler.cpp:449: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/qsampler-0.6.3/src/qsampler.cpp:501:16: [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 path(getenv("PATH")); data/qsampler-0.6.3/src/qsampler.cpp:226: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/qsampler-0.6.3/src/qsampler.cpp:430: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/qsampler-0.6.3/src/qsamplerChannel.cpp:670:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). m_audioRouting[i] = ::atoi(ppszAudioRouting[i]); data/qsampler-0.6.3/src/qsamplerChannel.cpp:815:11: [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/qsampler-0.6.3/src/qsamplerChannel.cpp:816: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 achHeader[16]; data/qsampler-0.6.3/src/qsamplerChannel.cpp:834:11: [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/qsampler-0.6.3/src/qsamplerChannel.cpp:835: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 achHeader[12]; data/qsampler-0.6.3/src/qsamplerDevice.cpp:424:28: [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. pParams[iParam].key = (char *) finalKeys[iParam].constData(); data/qsampler-0.6.3/src/qsamplerDevice.cpp:425:28: [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. pParams[iParam].value = (char *) finalVals[iParam].constData(); data/qsampler-0.6.3/src/qsamplerDevice.cpp:598:30: [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. pDepends[iDepend].key = (char *) finalKeys[i].constData(); data/qsampler-0.6.3/src/qsamplerDevice.cpp:599:30: [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. pDepends[iDepend].value = (char *) finalVals[i].constData(); data/qsampler-0.6.3/src/qsamplerMainForm.cpp:1008: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/qsampler-0.6.3/src/qsamplerMainForm.cpp:1090: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/qsampler-0.6.3/src/qsamplerMessages.cpp:145: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/qsampler-0.6.3/src/qsamplerMessages.cpp:270: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/qsampler-0.6.3/src/qsamplerUtilities.cpp:124: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 buf[5]; data/qsampler-0.6.3/src/qsamplerUtilities.cpp:186: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 buf[5]; data/qsampler-0.6.3/src/qsampler.cpp:398: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/qsampler-0.6.3/src/qsamplerChannel.cpp:817:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file.read(achHeader, 16) > 0) { data/qsampler-0.6.3/src/qsamplerChannel.cpp:836:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file.read(achHeader, 12) > 0) { data/qsampler-0.6.3/src/qsamplerMainForm.cpp:768:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (::read(g_fdSigusr1[1], &c, sizeof(c)) > 0) data/qsampler-0.6.3/src/qsamplerMainForm.cpp:781: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/qsampler-0.6.3/src/qsamplerMessages.cpp:147: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/qsampler-0.6.3/src/qsamplerMessages.cpp:151: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 = 27 Lines analyzed = 17207 in approximately 0.34 seconds (50325 lines/second) Physical Source Lines of Code (SLOC) = 11678 Hits@level = [0] 3 [1] 7 [2] 17 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 30 [1+] 27 [2+] 20 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 2.56893 [1+] 2.31204 [2+] 1.71262 [3+] 0.256893 [4+] 0.171262 [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.