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/csoundqt-0.9.7/QuteApp/aboutwidget.cpp Examining data/csoundqt-0.9.7/QuteApp/aboutwidget.h Examining data/csoundqt-0.9.7/QuteApp/main.cpp Examining data/csoundqt-0.9.7/QuteApp/quteapp.cpp Examining data/csoundqt-0.9.7/QuteApp/quteapp.h Examining data/csoundqt-0.9.7/QuteApp/quteappwizard.cpp Examining data/csoundqt-0.9.7/QuteApp/quteappwizard.h Examining data/csoundqt-0.9.7/QuteApp/settingsdialog.cpp Examining data/csoundqt-0.9.7/QuteApp/settingsdialog.h Examining data/csoundqt-0.9.7/QuteApp/simpledocument.cpp Examining data/csoundqt-0.9.7/QuteApp/simpledocument.h Examining data/csoundqt-0.9.7/src/CsoundHtmlOnlyWrapper.cpp Examining data/csoundqt-0.9.7/src/CsoundHtmlOnlyWrapper.h Examining data/csoundqt-0.9.7/src/about.cpp Examining data/csoundqt-0.9.7/src/about.h Examining data/csoundqt-0.9.7/src/additionalfilespage.cpp Examining data/csoundqt-0.9.7/src/additionalfilespage.h Examining data/csoundqt-0.9.7/src/appdetailspage.cpp Examining data/csoundqt-0.9.7/src/appdetailspage.h Examining data/csoundqt-0.9.7/src/appwizard.cpp Examining data/csoundqt-0.9.7/src/appwizard.h Examining data/csoundqt-0.9.7/src/basedocument.cpp Examining data/csoundqt-0.9.7/src/basedocument.h Examining data/csoundqt-0.9.7/src/baseview.cpp Examining data/csoundqt-0.9.7/src/baseview.h Examining data/csoundqt-0.9.7/src/configdialog.cpp Examining data/csoundqt-0.9.7/src/configdialog.h Examining data/csoundqt-0.9.7/src/configlists.cpp Examining data/csoundqt-0.9.7/src/configlists.h Examining data/csoundqt-0.9.7/src/console.cpp Examining data/csoundqt-0.9.7/src/console.h Examining data/csoundqt-0.9.7/src/csoundengine.cpp Examining data/csoundqt-0.9.7/src/csoundengine.h Examining data/csoundqt-0.9.7/src/csoundhtmlview.cpp Examining data/csoundqt-0.9.7/src/csoundhtmlview.h Examining data/csoundqt-0.9.7/src/csoundhtmlwrapper.cpp Examining data/csoundqt-0.9.7/src/csoundhtmlwrapper.h Examining data/csoundqt-0.9.7/src/csoundoptions.cpp Examining data/csoundqt-0.9.7/src/csoundoptions.h Examining data/csoundqt-0.9.7/src/curve.cpp Examining data/csoundqt-0.9.7/src/curve.h Examining data/csoundqt-0.9.7/src/debugpanel.cpp Examining data/csoundqt-0.9.7/src/debugpanel.h Examining data/csoundqt-0.9.7/src/dockhelp.cpp Examining data/csoundqt-0.9.7/src/dockhelp.h Examining data/csoundqt-0.9.7/src/documentpage.cpp Examining data/csoundqt-0.9.7/src/documentpage.h Examining data/csoundqt-0.9.7/src/documentview.cpp Examining data/csoundqt-0.9.7/src/documentview.h Examining data/csoundqt-0.9.7/src/dotgenerator.cpp Examining data/csoundqt-0.9.7/src/dotgenerator.h Examining data/csoundqt-0.9.7/src/eventsheet.cpp Examining data/csoundqt-0.9.7/src/eventsheet.h Examining data/csoundqt-0.9.7/src/filebeditor.cpp Examining data/csoundqt-0.9.7/src/filebeditor.h Examining data/csoundqt-0.9.7/src/findreplace.cpp Examining data/csoundqt-0.9.7/src/findreplace.h Examining data/csoundqt-0.9.7/src/framewidget.cpp Examining data/csoundqt-0.9.7/src/framewidget.h Examining data/csoundqt-0.9.7/src/graphicwindow.cpp Examining data/csoundqt-0.9.7/src/graphicwindow.h Examining data/csoundqt-0.9.7/src/highlighter.cpp Examining data/csoundqt-0.9.7/src/highlighter.h Examining data/csoundqt-0.9.7/src/inspector.cpp Examining data/csoundqt-0.9.7/src/inspector.h Examining data/csoundqt-0.9.7/src/keyboardshortcuts.cpp Examining data/csoundqt-0.9.7/src/keyboardshortcuts.h Examining data/csoundqt-0.9.7/src/livecodeeditor.cpp Examining data/csoundqt-0.9.7/src/livecodeeditor.h Examining data/csoundqt-0.9.7/src/liveeventcontrol.cpp Examining data/csoundqt-0.9.7/src/liveeventcontrol.h Examining data/csoundqt-0.9.7/src/liveeventframe.cpp Examining data/csoundqt-0.9.7/src/liveeventframe.h Examining data/csoundqt-0.9.7/src/main.cpp Examining data/csoundqt-0.9.7/src/midihandler.cpp Examining data/csoundqt-0.9.7/src/midihandler.h Examining data/csoundqt-0.9.7/src/midilearndialog.cpp Examining data/csoundqt-0.9.7/src/midilearndialog.h Examining data/csoundqt-0.9.7/src/newbreakpointdialog.cpp Examining data/csoundqt-0.9.7/src/newbreakpointdialog.h Examining data/csoundqt-0.9.7/src/node.cpp Examining data/csoundqt-0.9.7/src/node.h Examining data/csoundqt-0.9.7/src/opentryparser.cpp Examining data/csoundqt-0.9.7/src/opentryparser.h Examining data/csoundqt-0.9.7/src/options.cpp Examining data/csoundqt-0.9.7/src/options.h Examining data/csoundqt-0.9.7/src/pluginspage.cpp Examining data/csoundqt-0.9.7/src/pluginspage.h Examining data/csoundqt-0.9.7/src/pyqcsobject.cpp Examining data/csoundqt-0.9.7/src/pyqcsobject.h Examining data/csoundqt-0.9.7/src/pythonconsole.cpp Examining data/csoundqt-0.9.7/src/pythonconsole.h Examining data/csoundqt-0.9.7/src/qutebutton.cpp Examining data/csoundqt-0.9.7/src/qutebutton.h Examining data/csoundqt-0.9.7/src/qutecheckbox.cpp Examining data/csoundqt-0.9.7/src/qutecheckbox.h Examining data/csoundqt-0.9.7/src/qutecombobox.cpp Examining data/csoundqt-0.9.7/src/qutecombobox.h Examining data/csoundqt-0.9.7/src/quteconsole.cpp Examining data/csoundqt-0.9.7/src/quteconsole.h Examining data/csoundqt-0.9.7/src/qutecsound.cpp Examining data/csoundqt-0.9.7/src/qutecsound.h Examining data/csoundqt-0.9.7/src/qutedummy.cpp Examining data/csoundqt-0.9.7/src/qutedummy.h Examining data/csoundqt-0.9.7/src/qutegraph.cpp Examining data/csoundqt-0.9.7/src/qutegraph.h Examining data/csoundqt-0.9.7/src/quteknob.cpp Examining data/csoundqt-0.9.7/src/quteknob.h Examining data/csoundqt-0.9.7/src/qutemeter.cpp Examining data/csoundqt-0.9.7/src/qutemeter.h Examining data/csoundqt-0.9.7/src/qutescope.cpp Examining data/csoundqt-0.9.7/src/qutescope.h Examining data/csoundqt-0.9.7/src/qutesheet.cpp Examining data/csoundqt-0.9.7/src/qutesheet.h Examining data/csoundqt-0.9.7/src/quteslider.cpp Examining data/csoundqt-0.9.7/src/quteslider.h Examining data/csoundqt-0.9.7/src/qutespinbox.cpp Examining data/csoundqt-0.9.7/src/qutespinbox.h Examining data/csoundqt-0.9.7/src/qutetext.cpp Examining data/csoundqt-0.9.7/src/qutetext.h Examining data/csoundqt-0.9.7/src/qutewidget.cpp Examining data/csoundqt-0.9.7/src/qutewidget.h Examining data/csoundqt-0.9.7/src/scoreeditor.cpp Examining data/csoundqt-0.9.7/src/scoreeditor.h Examining data/csoundqt-0.9.7/src/texteditor.cpp Examining data/csoundqt-0.9.7/src/texteditor.h Examining data/csoundqt-0.9.7/src/types.h Examining data/csoundqt-0.9.7/src/util.h Examining data/csoundqt-0.9.7/src/utilitiesdialog.cpp Examining data/csoundqt-0.9.7/src/utilitiesdialog.h Examining data/csoundqt-0.9.7/src/widgetlayout.cpp Examining data/csoundqt-0.9.7/src/widgetlayout.h Examining data/csoundqt-0.9.7/src/widgetpanel.cpp Examining data/csoundqt-0.9.7/src/widgetpanel.h Examining data/csoundqt-0.9.7/src/widgetpreset.cpp Examining data/csoundqt-0.9.7/src/widgetpreset.h FINAL RESULTS: data/csoundqt-0.9.7/src/CsoundHtmlOnlyWrapper.cpp:284:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. message.sprintf(format, args); // NB! Should pass but not tested! data/csoundqt-0.9.7/src/configlists.cpp:68:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. msg = msg.vsprintf(fmt, args); data/csoundqt-0.9.7/src/csoundengine.cpp:108:19: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. msg = msg.vsprintf(fmt, args); data/csoundqt-0.9.7/src/csoundhtmlwrapper.cpp:418:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. message.sprintf(format, args); // NB! Should pass but not tested! data/csoundqt-0.9.7/src/csoundoptions.cpp:186:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argv[index], flag.toLocal8Bit()); data/csoundqt-0.9.7/src/csoundoptions.cpp:190:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argv[index++],fileName1.toLocal8Bit()); data/csoundqt-0.9.7/src/csoundoptions.cpp:193:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argv[index++],fileName2.toLocal8Bit()); data/csoundqt-0.9.7/src/main.cpp:117:61: [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. QString language = qsettings.value("language", QLocale::system().name()).toString(); data/csoundqt-0.9.7/src/pyqcsobject.cpp:287:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char*) p,stringValue.toLocal8Bit().constData() ); data/csoundqt-0.9.7/src/qutecsound.cpp:88:34: [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. QLocale::setDefault(QLocale::system()); //Does this take care of the decimal separator for different locales? data/csoundqt-0.9.7/src/qutecsound.cpp:401:15: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. msg = msg.vsprintf(fmt, args); data/csoundqt-0.9.7/src/qutecsound.cpp:715:15: [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. int ret = system(command.toLatin1()); data/csoundqt-0.9.7/src/qutecsound.cpp:754:11: [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. ret = system(command.toLatin1()); data/csoundqt-0.9.7/src/qutecsound.cpp:2821:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argv[index], flag.toLocal8Bit()); data/csoundqt-0.9.7/src/qutecsound.cpp:2825:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argv[index++], files[0].toLocal8Bit()); data/csoundqt-0.9.7/src/qutecsound.cpp:2827:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argv[index++],files[2].toLocal8Bit()); data/csoundqt-0.9.7/src/qutecsound.cpp:4761:99: [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. m_options->language = m_configlists.languageCodes.indexOf(settings.value("language", QLocale::system().name()).toString()); data/csoundqt-0.9.7/src/qutecsound.cpp:5211:51: [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. std::thread system_thread([command_line]{std::system(command_line);}); data/csoundqt-0.9.7/src/qutecsound.cpp:283:63: [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 programFilesPath = QDir::fromNativeSeparators(getenv("PROGRAMFILES")); data/csoundqt-0.9.7/src/qutecsound.cpp:284:66: [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 programFilesPathx86 = QDir::fromNativeSeparators(getenv("PROGRAMFILES(X86)")); data/csoundqt-0.9.7/src/qutecsound.cpp:1102:80: [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 rawWavePath = m_options->rawWaveActive ? m_options->rawWave : QString(getenv("RAWWAVE_PATH")); data/csoundqt-0.9.7/src/qutecsound.cpp:4018:62: [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 programFilesPath= QDir::fromNativeSeparators(getenv("PROGRAMFILES")); data/csoundqt-0.9.7/QuteApp/quteapp.cpp:61:9: [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 (f.open(QIODevice::WriteOnly)) { data/csoundqt-0.9.7/QuteApp/quteapp.cpp:119:56: [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). about->addAction(tr("About ..."), m_aboutWidget, SLOT(open())); data/csoundqt-0.9.7/QuteApp/quteapp.cpp:173: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(QFile::ReadOnly)) { data/csoundqt-0.9.7/src/CsoundHtmlOnlyWrapper.cpp:133: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 buffer[0x100]; data/csoundqt-0.9.7/src/appwizard.cpp:148:15: [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 (!csdFile.open(QIODevice::ReadOnly | QIODevice::Text)) { data/csoundqt-0.9.7/src/configlists.cpp:196: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/csoundqt-0.9.7/src/configlists.cpp:202: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:206: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:323: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/csoundqt-0.9.7/src/configlists.cpp:329: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:333: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:402:5: [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). f.open(QIODevice::ReadOnly | QIODevice::Text); data/csoundqt-0.9.7/src/configlists.cpp:422: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/csoundqt-0.9.7/src/configlists.cpp:428: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:432: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:462: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:479: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/csoundqt-0.9.7/src/configlists.cpp:485: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:489: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:574:5: [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). f.open(QIODevice::ReadOnly | QIODevice::Text); data/csoundqt-0.9.7/src/configlists.cpp:594: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/csoundqt-0.9.7/src/configlists.cpp:600: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:604: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:633: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:650: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/csoundqt-0.9.7/src/configlists.cpp:656: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:660: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). tempFile.open(); data/csoundqt-0.9.7/src/configlists.cpp:722: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. const char *argv[33]; data/csoundqt-0.9.7/src/configlists.cpp:724: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 *argv[33]; data/csoundqt-0.9.7/src/configlists.cpp:729:11: [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. strncpy((char *) argv[0], "csound", 6); data/csoundqt-0.9.7/src/configlists.cpp:733:12: [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. strncpy((char *) argv[index], flag.toLatin1(), flag.size()); data/csoundqt-0.9.7/src/csoundengine.cpp:486:13: [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 chanString[2048]; // large enough for long strings in displays data/csoundqt-0.9.7/src/csoundengine.cpp:913:19: [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. free((char *) argv[i]); data/csoundqt-0.9.7/src/csoundhtmlview.cpp:71: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). csdfile.open(QIODevice::WriteOnly); data/csoundqt-0.9.7/src/csoundhtmlwrapper.cpp:203: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 buffer[0x100]; data/csoundqt-0.9.7/src/csoundoptions.cpp:181:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)argv[index++], "csound"); data/csoundqt-0.9.7/src/csoundoptions.cpp:181:10: [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. strcpy((char *)argv[index++], "csound"); data/csoundqt-0.9.7/src/dockhelp.cpp:71: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(QFile::ReadOnly | QFile::Text)) { data/csoundqt-0.9.7/src/documentpage.cpp:964:43: [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). void DocumentPage::setOpenProperties(bool open) data/csoundqt-0.9.7/src/documentpage.cpp:967:37: [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). wl->setProperty("openProperties", open); data/csoundqt-0.9.7/src/documentpage.h:156:30: [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). void setOpenProperties(bool open); data/csoundqt-0.9.7/src/eventsheet.cpp:910:9: [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). module.open(QFile::WriteOnly | QIODevice::Text); data/csoundqt-0.9.7/src/eventsheet.cpp:912:7: [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(QIODevice::ReadOnly); data/csoundqt-0.9.7/src/eventsheet.cpp:920:9: [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). script.open(QFile::WriteOnly | QIODevice::Text); data/csoundqt-0.9.7/src/eventsheet.cpp:922: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). file2.open(QIODevice::ReadOnly); data/csoundqt-0.9.7/src/eventsheet.cpp:929: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). dataFile.open(QFile::WriteOnly | QIODevice::Text); data/csoundqt-0.9.7/src/eventsheet.cpp:966: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). outFile.open(QIODevice::ReadWrite); data/csoundqt-0.9.7/src/filebeditor.cpp:85: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::WriteOnly)) { data/csoundqt-0.9.7/src/opentryparser.cpp:35: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/csoundqt-0.9.7/src/pythonconsole.cpp:80: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/csoundqt-0.9.7/src/qutecsound.cpp:368:10: [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(QFile::ReadOnly); data/csoundqt-0.9.7/src/qutecsound.cpp:629:16: [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). void CsoundQt::open() data/csoundqt-0.9.7/src/qutecsound.cpp:731:15: [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() || !pngFile.open()) { data/csoundqt-0.9.7/src/qutecsound.cpp:731:34: [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() || !pngFile.open()) { data/csoundqt-0.9.7/src/qutecsound.cpp:740:10: [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(); data/csoundqt-0.9.7/src/qutecsound.cpp:995:10: [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(QIODevice::ReadOnly); data/csoundqt-0.9.7/src/qutecsound.cpp:997:18: [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). quickRefFile.open(QFile::WriteOnly); data/csoundqt-0.9.7/src/qutecsound.cpp:1041: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). if (logFile.open(QIODevice::ReadWrite | QIODevice::Text)) { data/csoundqt-0.9.7/src/qutecsound.cpp:1651: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). if(file.open(QFile::WriteOnly | QFile::Text)) { data/csoundqt-0.9.7/src/qutecsound.cpp:1766:26: [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 (!csdFile.open()) { data/csoundqt-0.9.7/src/qutecsound.cpp:1778:14: [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(QFile::ReadOnly)) { data/csoundqt-0.9.7/src/qutecsound.cpp:1870: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 (!tempFile.open()) { data/csoundqt-0.9.7/src/qutecsound.cpp:1887:21: [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 (!scriptFile.open()) { data/csoundqt-0.9.7/src/qutecsound.cpp:2799:16: [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. static char *argv[33]; data/csoundqt-0.9.7/src/qutecsound.cpp:2824:24: [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. argv[index] = (char *) calloc(files[0].size()+1, sizeof(char)); data/csoundqt-0.9.7/src/qutecsound.cpp:2826:24: [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. argv[index] = (char *) calloc(files[2].size()+1, sizeof(char)); data/csoundqt-0.9.7/src/qutecsound.cpp:2886:19: [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)) data/csoundqt-0.9.7/src/qutecsound.cpp:3196:54: [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). connect(openAct, SIGNAL(triggered()), this, SLOT(open())); data/csoundqt-0.9.7/src/qutecsound.cpp:5247:15: [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(QFile::ReadOnly)) { data/csoundqt-0.9.7/src/qutecsound.cpp:5290:35: [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 (companionFile.open(QFile::ReadOnly)) { data/csoundqt-0.9.7/src/qutecsound.cpp:5313:35: [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 (companionFlle.open(QFile::ReadOnly)) { data/csoundqt-0.9.7/src/qutecsound.cpp:5511:15: [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(QFile::WriteOnly)) { data/csoundqt-0.9.7/src/qutecsound.cpp:5678:6: [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). f.open(QIODevice::ReadWrite | QIODevice::Text); data/csoundqt-0.9.7/src/qutecsound.cpp:5733: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). return open; data/csoundqt-0.9.7/src/qutecsound.h:187:7: [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). void open(); data/csoundqt-0.9.7/src/utilitiesdialog.cpp:449: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(QFile::ReadOnly | QFile::Text)) { data/csoundqt-0.9.7/src/widgetlayout.h:106:30: [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). void setOpenProperties(bool open) {m_openProperties = open; } data/csoundqt-0.9.7/src/widgetlayout.h:106:56: [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). void setOpenProperties(bool open) {m_openProperties = open; } data/csoundqt-0.9.7/src/configlists.cpp:729:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy((char *) argv[0], "csound", 6); data/csoundqt-0.9.7/src/configlists.cpp:733:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *) argv[index], flag.toLatin1(), flag.size()); data/csoundqt-0.9.7/src/csoundengine.cpp:151:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(string, newValue.toLocal8Bit(), maxlen); data/csoundqt-0.9.7/src/csoundengine.cpp:210:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(string, newValue.toLocal8Bit(), maxlen -1 ); data/csoundqt-0.9.7/src/csoundengine.cpp:1154:18: [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. QThread::usleep(ud_local->msgRefreshTime); data/csoundqt-0.9.7/src/csoundengine.cpp:1156:9: [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(ud_local->msgRefreshTime); data/csoundqt-0.9.7/src/widgetlayout.cpp:174:14: [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. QThread::usleep(10000); data/csoundqt-0.9.7/src/widgetlayout.cpp:176:5: [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(10000); ANALYSIS SUMMARY: Hits = 108 Lines analyzed = 43081 in approximately 1.31 seconds (32932 lines/second) Physical Source Lines of Code (SLOC) = 33703 Hits@level = [0] 0 [1] 8 [2] 78 [3] 4 [4] 18 [5] 0 Hits@level+ = [0+] 108 [1+] 108 [2+] 100 [3+] 22 [4+] 18 [5+] 0 Hits/KSLOC@level+ = [0+] 3.20446 [1+] 3.20446 [2+] 2.96709 [3+] 0.652761 [4+] 0.534077 [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.