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/texworks-0.6.5/ci/travis-ci/mxe/hunspell-test.cpp Examining data/texworks-0.6.5/ci/travis-ci/mxe/poppler-test.cxx Examining data/texworks-0.6.5/modules/QtPDF/CMake/Modules/FindOpenJPEGVersion.c Examining data/texworks-0.6.5/modules/QtPDF/PDFViewer.cpp Examining data/texworks-0.6.5/modules/QtPDF/PDFViewer.h Examining data/texworks-0.6.5/modules/QtPDF/main.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PDFActions.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PDFActions.h Examining data/texworks-0.6.5/modules/QtPDF/src/PDFAnnotations.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PDFAnnotations.h Examining data/texworks-0.6.5/modules/QtPDF/src/PDFBackend.h Examining data/texworks-0.6.5/modules/QtPDF/src/PDFDocumentTools.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PDFDocumentTools.h Examining data/texworks-0.6.5/modules/QtPDF/src/PDFDocumentView.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PDFDocumentView.h Examining data/texworks-0.6.5/modules/QtPDF/src/PDFDocumentWidget.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PDFDocumentWidget.h Examining data/texworks-0.6.5/modules/QtPDF/src/PDFTransitions.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PDFTransitions.h Examining data/texworks-0.6.5/modules/QtPDF/src/PaperSizes.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/PaperSizes.h Examining data/texworks-0.6.5/modules/QtPDF/src/backends/MuPDFBackend.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/backends/MuPDFBackend.h Examining data/texworks-0.6.5/modules/QtPDF/src/backends/PopplerQtBackend.cpp Examining data/texworks-0.6.5/modules/QtPDF/src/backends/PopplerQtBackend.h Examining data/texworks-0.6.5/modules/QtPDF/src/PDFBackend.cpp Examining data/texworks-0.6.5/modules/QtPDF/unit-tests/TestQtPDF.cpp Examining data/texworks-0.6.5/modules/QtPDF/unit-tests/TestQtPDF.h Examining data/texworks-0.6.5/modules/synctex/synctex_parser.c Examining data/texworks-0.6.5/modules/synctex/synctex_parser.h Examining data/texworks-0.6.5/modules/synctex/synctex_parser_advanced.h Examining data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c Examining data/texworks-0.6.5/modules/synctex/synctex_parser_utils.h Examining data/texworks-0.6.5/modules/synctex/synctex_version.h Examining data/texworks-0.6.5/plugins-src/TWLuaPlugin/LuaScript.cpp Examining data/texworks-0.6.5/plugins-src/TWLuaPlugin/LuaScript.h Examining data/texworks-0.6.5/plugins-src/TWLuaPlugin/LuaScriptInterface.cpp Examining data/texworks-0.6.5/plugins-src/TWLuaPlugin/LuaScriptInterface.h Examining data/texworks-0.6.5/plugins-src/TWPythonPlugin/PythonScript.cpp Examining data/texworks-0.6.5/plugins-src/TWPythonPlugin/PythonScript.h Examining data/texworks-0.6.5/plugins-src/TWPythonPlugin/PythonScriptInterface.cpp Examining data/texworks-0.6.5/plugins-src/TWPythonPlugin/PythonScriptInterface.h Examining data/texworks-0.6.5/src/BibTeXFile.cpp Examining data/texworks-0.6.5/src/BibTeXFile.h Examining data/texworks-0.6.5/src/CitationSelectDialog.cpp Examining data/texworks-0.6.5/src/CitationSelectDialog.h Examining data/texworks-0.6.5/src/ClickableLabel.cpp Examining data/texworks-0.6.5/src/ClickableLabel.h Examining data/texworks-0.6.5/src/ClosableTabWidget.cpp Examining data/texworks-0.6.5/src/ClosableTabWidget.h Examining data/texworks-0.6.5/src/CommandlineParser.cpp Examining data/texworks-0.6.5/src/CommandlineParser.h Examining data/texworks-0.6.5/src/CompletingEdit.cpp Examining data/texworks-0.6.5/src/CompletingEdit.h Examining data/texworks-0.6.5/src/ConfirmDelete.cpp Examining data/texworks-0.6.5/src/ConfirmDelete.h Examining data/texworks-0.6.5/src/DefaultBinaryPathsWin.h Examining data/texworks-0.6.5/src/DefaultPrefs.h Examining data/texworks-0.6.5/src/Engine.cpp Examining data/texworks-0.6.5/src/Engine.h Examining data/texworks-0.6.5/src/FindDialog.cpp Examining data/texworks-0.6.5/src/FindDialog.h Examining data/texworks-0.6.5/src/HardWrapDialog.cpp Examining data/texworks-0.6.5/src/HardWrapDialog.h Examining data/texworks-0.6.5/src/InterProcessCommunicator.h Examining data/texworks-0.6.5/src/InterProcessCommunicatorDBus.cpp Examining data/texworks-0.6.5/src/InterProcessCommunicatorDummy.cpp Examining data/texworks-0.6.5/src/InterProcessCommunicatorWin.cpp Examining data/texworks-0.6.5/src/PDFDocumentWindow.cpp Examining data/texworks-0.6.5/src/PDFDocumentWindow.h Examining data/texworks-0.6.5/src/PrefsDialog.cpp Examining data/texworks-0.6.5/src/PrefsDialog.h Examining data/texworks-0.6.5/src/ResourcesDialog.cpp Examining data/texworks-0.6.5/src/ResourcesDialog.h Examining data/texworks-0.6.5/src/ScreenCalibrationWidget.cpp Examining data/texworks-0.6.5/src/ScreenCalibrationWidget.h Examining data/texworks-0.6.5/src/ScriptManagerWidget.cpp Examining data/texworks-0.6.5/src/ScriptManagerWidget.h Examining data/texworks-0.6.5/src/Settings.cpp Examining data/texworks-0.6.5/src/Settings.h Examining data/texworks-0.6.5/src/TWApp.cpp Examining data/texworks-0.6.5/src/TWApp.h Examining data/texworks-0.6.5/src/TWScriptManager.cpp Examining data/texworks-0.6.5/src/TWScriptManager.h Examining data/texworks-0.6.5/src/TWScriptableWindow.cpp Examining data/texworks-0.6.5/src/TWScriptableWindow.h Examining data/texworks-0.6.5/src/TWSynchronizer.cpp Examining data/texworks-0.6.5/src/TWSynchronizer.h Examining data/texworks-0.6.5/src/TWSystemCmd.cpp Examining data/texworks-0.6.5/src/TWSystemCmd.h Examining data/texworks-0.6.5/src/TWTextCodecs.cpp Examining data/texworks-0.6.5/src/TWTextCodecs.h Examining data/texworks-0.6.5/src/TWUtils.cpp Examining data/texworks-0.6.5/src/TWUtils.h Examining data/texworks-0.6.5/src/TWVersion.h Examining data/texworks-0.6.5/src/TeXDocks.cpp Examining data/texworks-0.6.5/src/TeXDocks.h Examining data/texworks-0.6.5/src/TeXDocumentWindow.cpp Examining data/texworks-0.6.5/src/TeXDocumentWindow.h Examining data/texworks-0.6.5/src/TeXHighlighter.cpp Examining data/texworks-0.6.5/src/TeXHighlighter.h Examining data/texworks-0.6.5/src/TemplateDialog.cpp Examining data/texworks-0.6.5/src/TemplateDialog.h Examining data/texworks-0.6.5/src/document/Document.h Examining data/texworks-0.6.5/src/document/SpellChecker.cpp Examining data/texworks-0.6.5/src/document/SpellChecker.h Examining data/texworks-0.6.5/src/document/TeXDocument.cpp Examining data/texworks-0.6.5/src/document/TeXDocument.h Examining data/texworks-0.6.5/src/document/TextDocument.cpp Examining data/texworks-0.6.5/src/document/TextDocument.h Examining data/texworks-0.6.5/src/main.cpp Examining data/texworks-0.6.5/src/scripting/JSScript.cpp Examining data/texworks-0.6.5/src/scripting/JSScript.h Examining data/texworks-0.6.5/src/scripting/JSScriptInterface.cpp Examining data/texworks-0.6.5/src/scripting/JSScriptInterface.h Examining data/texworks-0.6.5/src/scripting/Script.cpp Examining data/texworks-0.6.5/src/scripting/Script.h Examining data/texworks-0.6.5/src/scripting/ScriptAPI.cpp Examining data/texworks-0.6.5/src/scripting/ScriptAPI.h Examining data/texworks-0.6.5/src/scripting/ScriptAPIInterface.h Examining data/texworks-0.6.5/src/scripting/ScriptLanguageInterface.h Examining data/texworks-0.6.5/src/ui/LineNumberWidget.cpp Examining data/texworks-0.6.5/src/ui/LineNumberWidget.h Examining data/texworks-0.6.5/src/utils/FileVersionDatabase.cpp Examining data/texworks-0.6.5/src/utils/FileVersionDatabase.h Examining data/texworks-0.6.5/unit-tests/BibTeXFile_test.cpp Examining data/texworks-0.6.5/unit-tests/BibTeXFile_test.h Examining data/texworks-0.6.5/unit-tests/FileVersionDatabase_test.cpp Examining data/texworks-0.6.5/unit-tests/FileVersionDatabase_test.h Examining data/texworks-0.6.5/unit-tests/LineNumberWidget_test.cpp Examining data/texworks-0.6.5/unit-tests/LineNumberWidget_test.h Examining data/texworks-0.6.5/unit-tests/LuaScripting_test.cpp Examining data/texworks-0.6.5/unit-tests/LuaScripting_test.h Examining data/texworks-0.6.5/unit-tests/MockScriptingAPI.h Examining data/texworks-0.6.5/unit-tests/Scripting_test.cpp Examining data/texworks-0.6.5/unit-tests/Scripting_test.h FINAL RESULTS: data/texworks-0.6.5/modules/QtPDF/src/backends/MuPDFBackend.cpp:439:21: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if (!_mupdf_data->crypt) data/texworks-0.6.5/modules/synctex/synctex_parser.c:313:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SYNCTEX_PRINT_CHARINDEX_FMT SYNCTEX_PRINT_CHARINDEX_WHAT) data/texworks-0.6.5/modules/synctex/synctex_parser.c:317:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SYNCTEX_PRINT_LINEINDEX_FMT SYNCTEX_PRINT_LINEINDEX_WHAT) data/texworks-0.6.5/modules/synctex/synctex_parser.c:319:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SYNCTEX_PRINT_CHARINDEX_FMT "\n" SYNCTEX_PRINT_CHARINDEX_WHAT) data/texworks-0.6.5/modules/synctex/synctex_parser.c:321:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SYNCTEX_PRINT_CHARINDEX_FMT "\n"SYNCTEX_PRINT_LINEINDEX_WHAT) data/texworks-0.6.5/modules/synctex/synctex_parser.c:558:25: [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). if (open.synctex != strcpy(open.synctex,output)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:582:25: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (open.synctex != strcat(open.synctex,synctex_suffix)){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:587:62: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name,synctex_suffix))){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:599:29: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (open.synctex != strcat(open.synctex,synctex_suffix_gz)){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:606:66: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name,synctex_suffix_gz))){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:684:37: [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). if (build_output != strcpy(build_output,output)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:690:33: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (build_output == strcat(build_output,build_directory)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:699:37: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (build_output != strcat(build_output,lpc)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:738:38: [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). } else if (reader->output != strcpy(reader->output,output)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:3171:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"Input:%i:%s(%i)" SYNCTEX_PRINT_CHARINDEX_FMT, data/texworks-0.6.5/modules/synctex/synctex_parser.c:3196:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"{%i...}" SYNCTEX_PRINT_CHARINDEX_FMT, data/texworks-0.6.5/modules/synctex/synctex_parser.c:3220:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"<%i...>" SYNCTEX_PRINT_CHARINDEX_FMT, data/texworks-0.6.5/modules/synctex/synctex_parser.c:3245:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"[%i,%i:%i,%i:%i,%i,%i...]" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3285:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"(%i,%i~%i*%i:%i,%i:%i,%i,%i...)" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3365:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"h%i,%i:%i,%i:%i,%i,%i" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3400:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"glue:%i,%i:%i,%i" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3429:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"rule:%i,%i:%i,%i:%i,%i,%i" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3464:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"math:%i,%i:%i,%i" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3493:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"kern:%i,%i:%i,%i:%i" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3524:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"boundary:%i,%i:%i,%i" data/texworks-0.6.5/modules/synctex/synctex_parser.c:3553:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"box bdry:%i,%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT, data/texworks-0.6.5/modules/synctex/synctex_parser.c:3579:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"form ref:%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT, data/texworks-0.6.5/modules/synctex/synctex_parser.c:3641:9: [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(abstract,SYNCTEX_ABSTRACT_MAX, data/texworks-0.6.5/modules/synctex/synctex_parser.c:3682:9: [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(abstract,SYNCTEX_ABSTRACT_MAX,"(*%i,%i~%i*%i:%i,%i:%i,%i,%i...*)/%p" data/texworks-0.6.5/modules/synctex/synctex_parser.c:8397:18: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. result = vfprintf(updater->file.as_FILE_p, data/texworks-0.6.5/modules/synctex/synctex_parser_advanced.h:530:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf((desc), ##__VA_ARGS__); \ data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:106:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. result = vsprintf(buff, reason, arg) +strlen(prompt); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:130:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. result += vfprintf(where, reason, arg); data/texworks-0.6.5/src/PrefsDialog.cpp:534:100: [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. dlg.localePopup->addItem(tr("System default [%1]").arg(QLocale::languageToString(QLocale(QLocale::system().name()).language()))); data/texworks-0.6.5/src/PrefsDialog.cpp:717:33: [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 locale = QLocale::system().name(); data/texworks-0.6.5/src/TWApp.cpp:163:74: [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 locale = settings.value(QString::fromLatin1("locale"), QLocale::system().name()).toString(); data/texworks-0.6.5/src/TWUtils.cpp:292:18: [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. loc = QLocale::system().name(); data/texworks-0.6.5/src/scripting/Script.cpp:258:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (mm.access() != QMetaMethod::Public) data/texworks-0.6.5/src/scripting/Script.cpp:296: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(strTypeName, qPrintable(typeName)); data/texworks-0.6.5/src/scripting/ScriptAPI.cpp:215:36: [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. QMap<QString, QVariant> ScriptAPI::system(const QString& cmdline, bool waitForResult) data/texworks-0.6.5/src/scripting/ScriptAPI.h:87:26: [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. QMap<QString, QVariant> system(const QString& cmdline, bool waitForResult = true) override; data/texworks-0.6.5/src/scripting/ScriptAPIInterface.h:72: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. virtual QMap<QString, QVariant> system(const QString& cmdline, bool waitForResult = true) = 0; data/texworks-0.6.5/unit-tests/MockScriptingAPI.h:62:26: [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. QMap<QString, QVariant> system(const QString& cmdline, bool waitForResult = true) override { data/texworks-0.6.5/unit-tests/Scripting_test.cpp:208:16: [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. QCOMPARE(api.system(QString()), retVal); data/texworks-0.6.5/modules/QtPDF/src/PDFTransitions.cpp:325:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(static_cast<unsigned int>(time(nullptr))); data/texworks-0.6.5/modules/QtPDF/src/PDFTransitions.cpp:340:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(static_cast<unsigned int>(time(nullptr))); data/texworks-0.6.5/src/TWApp.cpp:147:43: [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 envPath = QString::fromLocal8Bit(getenv("TW_INIPATH")); data/texworks-0.6.5/src/TWApp.cpp:152:35: [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. envPath = QString::fromLocal8Bit(getenv("TW_LIBPATH")); data/texworks-0.6.5/src/TWApp.cpp:787:43: [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 envPath = QString::fromLocal8Bit(getenv("PATH")); data/texworks-0.6.5/src/TWScriptManager.cpp:108:46: [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 pluginPath = QString::fromLocal8Bit(getenv("TW_PLUGINPATH")); data/texworks-0.6.5/src/TWUtils.cpp:95: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. QString dicPath = QString::fromLocal8Bit(getenv("TW_DICPATH")); data/texworks-0.6.5/src/TWUtils.cpp:285:44: [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 helpPath = QString::fromLocal8Bit(getenv("TW_HELPPATH")); data/texworks-0.6.5/modules/QtPDF/PDFViewer.cpp:39:110: [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). _toolBar->addAction(QIcon(QString::fromUtf8(":/QtPDF/icons/document-open.png")), tr("Open..."), this, SLOT(open())); data/texworks-0.6.5/modules/QtPDF/PDFViewer.cpp:100: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). void PDFViewer::open() data/texworks-0.6.5/modules/QtPDF/PDFViewer.h:33: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). void open(); data/texworks-0.6.5/modules/QtPDF/src/PDFAnnotations.h:228:50: [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 setOpen(const bool open = true) { _open = open; } data/texworks-0.6.5/modules/synctex/synctex_parser.c:550:51: [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). const char * mode = _synctex_get_io_mode_name(open.io_mode); data/texworks-0.6.5/modules/synctex/synctex_parser.c:552: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). if (NULL == (open.synctex = (char *)malloc(size))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:554: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). return open; data/texworks-0.6.5/modules/synctex/synctex_parser.c:558: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 (open.synctex != strcpy(open.synctex,output)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:558:32: [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 (open.synctex != strcpy(open.synctex,output)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:561: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). free(open.synctex); data/texworks-0.6.5/modules/synctex/synctex_parser.c:562: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). open.synctex = NULL; data/texworks-0.6.5/modules/synctex/synctex_parser.c:564: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). return open; data/texworks-0.6.5/modules/synctex/synctex_parser.c:567:40: [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). _synctex_strip_last_path_extension(open.synctex); data/texworks-0.6.5/modules/synctex/synctex_parser.c:568: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 (!strlen(open.synctex)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:574:60: [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 (_synctex_copy_with_quoting_last_path_component(open.synctex,"ed,size) || quoted == NULL) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:578: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). quoteless_synctex_name = open.synctex; data/texworks-0.6.5/modules/synctex/synctex_parser.c:579: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). open.synctex = quoted; data/texworks-0.6.5/modules/synctex/synctex_parser.c:582: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 (open.synctex != strcat(open.synctex,synctex_suffix)){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:582:32: [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 (open.synctex != strcat(open.synctex,synctex_suffix)){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:591: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). if (NULL == (open.file = gzopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:591: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). if (NULL == (open.file = gzopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:595:60: [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). _synctex_error("could not open %s, error %i\n",open.synctex,errno); data/texworks-0.6.5/modules/synctex/synctex_parser.c:599: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 (open.synctex != strcat(open.synctex,synctex_suffix_gz)){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:599: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). if (open.synctex != strcat(open.synctex,synctex_suffix_gz)){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:603: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). open.io_mode |= synctex_io_gz_mask; data/texworks-0.6.5/modules/synctex/synctex_parser.c:604:42: [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). mode = _synctex_get_io_mode_name(open.io_mode); /* the file is a compressed and is a binary file, this caused errors on Windows */ data/texworks-0.6.5/modules/synctex/synctex_parser.c:610:22: [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 (NULL == (open.file = gzopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:610:41: [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 (NULL == (open.file = gzopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:614:64: [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). _synctex_error("Could not open %s, error %i\n",open.synctex,errno); data/texworks-0.6.5/modules/synctex/synctex_parser.c:622: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). gzclose(open.file); data/texworks-0.6.5/modules/synctex/synctex_parser.c:623:20: [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 (rename(open.synctex,quoteless_synctex_name)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:624:68: [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). _synctex_error("Could not rename %s to %s, error %i\n",open.synctex,quoteless_synctex_name,errno); data/texworks-0.6.5/modules/synctex/synctex_parser.c:626: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 (NULL == (open.file = gzopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:626:45: [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 (NULL == (open.file = gzopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:631:74: [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). _synctex_error("Could not open again %s, error %i\n",open.synctex,errno); data/texworks-0.6.5/modules/synctex/synctex_parser.c:637: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 (NULL == (open.file = gzopen(quoteless_synctex_name,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:646: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). free(open.synctex); data/texworks-0.6.5/modules/synctex/synctex_parser.c:647: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). open.synctex = quoteless_synctex_name; data/texworks-0.6.5/modules/synctex/synctex_parser.c:652: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). open.status = SYNCTEX_STATUS_OK; data/texworks-0.6.5/modules/synctex/synctex_parser.c:653: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/texworks-0.6.5/modules/synctex/synctex_parser.c:665: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 (open.status == SYNCTEX_STATUS_OK) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:666: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). return open; data/texworks-0.6.5/modules/synctex/synctex_parser.c:686:28: [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/texworks-0.6.5/modules/synctex/synctex_parser.c:695:32: [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/texworks-0.6.5/modules/synctex/synctex_parser.c:701:28: [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/texworks-0.6.5/modules/synctex/synctex_parser.c:708: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/texworks-0.6.5/modules/synctex/synctex_parser.c:727: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 (open.status<SYNCTEX_STATUS_OK) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:729: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 (open.status<SYNCTEX_STATUS_OK) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:733:27: [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). reader->synctex = open.synctex; data/texworks-0.6.5/modules/synctex/synctex_parser.c:734:24: [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). reader->file = open.file; data/texworks-0.6.5/modules/synctex/synctex_parser.c:2876:18: [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 const char * isa[synctex_node_number_of_types] = data/texworks-0.6.5/modules/synctex/synctex_parser.c:3169: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3194: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3218: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3243: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3283: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3327: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3363: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3398: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3427: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3462: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3491: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3522: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3551: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3577: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3600: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3639: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3680: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:3725: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. static char abstract[SYNCTEX_ABSTRACT_MAX] = "none"; data/texworks-0.6.5/modules/synctex/synctex_parser.c:4160:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (memcpy(string+already_len,SYNCTEX_CUR,len)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8460:20: [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). synctex_open_s open; data/texworks-0.6.5/modules/synctex/synctex_parser.c:8468: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 (open.status < SYNCTEX_STATUS_OK) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8470: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 (open.status < SYNCTEX_STATUS_OK) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8478: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). gzclose(open.file); data/texworks-0.6.5/modules/synctex/synctex_parser.c:8480:38: [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). mode = _synctex_get_io_mode_name(open.io_mode|synctex_io_append_mask);/* either "a" or "ab", depending on the file extension */ data/texworks-0.6.5/modules/synctex/synctex_parser.c:8481: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 (open.io_mode&synctex_io_gz_mask) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8482:48: [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). if (NULL == (updater->file.as_FILE_p = fopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8482: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). if (NULL == (updater->file.as_FILE_p = fopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8484:83: [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). _synctex_error("! synctex_updater_new_with_file: Can't append to %s",open.synctex); data/texworks-0.6.5/modules/synctex/synctex_parser.c:8485: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). free(open.synctex); data/texworks-0.6.5/modules/synctex/synctex_parser.c:8491:55: [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 (NULL == (updater->file.as_gzFile = gzopen(open.synctex,mode))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8497:38: [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). printf("SyncTeX: updating %s...",open.synctex); data/texworks-0.6.5/modules/synctex/synctex_parser.c:8498: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). _synctex_free(open.synctex); data/texworks-0.6.5/modules/synctex/synctex_parser.c:8565:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(copy,name,strlen(name)+1); data/texworks-0.6.5/modules/synctex/synctex_parser.c:8759: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 n[25]; /* name */ data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:550:24: [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 * F = fopen(synctex_name, "r"); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:569:18: [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 const char * synctex_io_modes[4] = {"r","rb","a","ab"}; data/texworks-0.6.5/plugins-src/TWPythonPlugin/PythonScript.cpp:103: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). if (!scriptFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/BibTeXFile.cpp:93: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/texworks-0.6.5/src/BibTeXFile.cpp:125: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). for (i = from + 1; i < content.size() && open > 0; ++i) { data/texworks-0.6.5/src/BibTeXFile.cpp:130:38: [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). else if (content[i] == endDelim) --open; data/texworks-0.6.5/src/BibTeXFile.cpp:131:40: [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). else if (content[i] == startDelim) ++open; data/texworks-0.6.5/src/CompletingEdit.cpp:735: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 (quotesModesFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/CompletingEdit.cpp:760:40: [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). newMode.mappings[key] = QuotePair(open,close); data/texworks-0.6.5/src/CompletingEdit.cpp:1036:48: [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 (completionFile.exists() && completionFile.open(QIODevice::ReadOnly | QIODevice::Text)) { data/texworks-0.6.5/src/CompletingEdit.cpp:1173:25: [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 (indentPatternFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/PDFDocumentWindow.cpp:177: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(actionOpen, SIGNAL(triggered()), qApp, SLOT(open())); data/texworks-0.6.5/src/TWApp.cpp:203: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(actionOpen, SIGNAL(triggered()), this, SLOT(open())); data/texworks-0.6.5/src/TWApp.cpp:573:4: [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). open(); data/texworks-0.6.5/src/TWApp.cpp:655: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). void TWApp::open() data/texworks-0.6.5/src/TWApp.h:194: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/texworks-0.6.5/src/TWUtils.cpp:59: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 (theFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/TWUtils.cpp:76: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 (theFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/TWUtils.cpp:241: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). titleFile.open(QIODevice::ReadOnly | QIODevice::Text); data/texworks-0.6.5/src/TWUtils.cpp:977: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). if (pairsFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/TWUtils.cpp:1005: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 (configFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/TeXDocumentWindow.cpp:160: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(actionOpen, SIGNAL(triggered()), this, SLOT(open())); data/texworks-0.6.5/src/TeXDocumentWindow.cpp:583:25: [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 TeXDocumentWindow::open() data/texworks-0.6.5/src/TeXDocumentWindow.cpp:605:39: [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). TeXDocumentWindow* TeXDocumentWindow::open(const QString &fileName) data/texworks-0.6.5/src/TeXDocumentWindow.cpp:635: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). doc = doc->open(fileName); // open into existing window if untitled/empty data/texworks-0.6.5/src/TeXDocumentWindow.cpp:961: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/texworks-0.6.5/src/TeXDocumentWindow.cpp:1411: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(QFile::WriteOnly)) { data/texworks-0.6.5/src/TeXDocumentWindow.h:81: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). TeXDocumentWindow *open(const QString &fileName); data/texworks-0.6.5/src/TeXDocumentWindow.h:147: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/texworks-0.6.5/src/TeXHighlighter.cpp:177: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). if (syntaxFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/TeXHighlighter.cpp:242:22: [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 (tagPatternFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/TemplateDialog.cpp:87: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/texworks-0.6.5/src/scripting/JSScript.cpp:51: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). if (!scriptFile.open(QIODevice::ReadOnly)) { data/texworks-0.6.5/src/scripting/Script.cpp:63: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). if (!file.exists() || !file.open(QIODevice::ReadOnly)) data/texworks-0.6.5/src/scripting/ScriptAPI.cpp:307: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 (!fout.open(QIODevice::WriteOnly | QIODevice::Text)) data/texworks-0.6.5/src/scripting/ScriptAPI.cpp:338: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 (!fin.open(QIODevice::ReadOnly | QIODevice::Text)) { data/texworks-0.6.5/src/utils/FileVersionDatabase.cpp:37: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 (!fin.open(QIODevice::ReadOnly | QIODevice::Text)) data/texworks-0.6.5/src/utils/FileVersionDatabase.cpp:66: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 (!fout.open(QIODevice::WriteOnly | QIODevice::Text)) data/texworks-0.6.5/src/utils/FileVersionDatabase.cpp:134: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 (!fin.open(QIODevice::ReadOnly)) data/texworks-0.6.5/unit-tests/FileVersionDatabase_test.cpp:122: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). tmpFile.open(); data/texworks-0.6.5/modules/synctex/synctex_parser.c:551:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t size = strlen(output)+strlen(synctex_suffix)+strlen(synctex_suffix_gz)+1; data/texworks-0.6.5/modules/synctex/synctex_parser.c:551:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t size = strlen(output)+strlen(synctex_suffix)+strlen(synctex_suffix_gz)+1; data/texworks-0.6.5/modules/synctex/synctex_parser.c:551:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t size = strlen(output)+strlen(synctex_suffix)+strlen(synctex_suffix_gz)+1; data/texworks-0.6.5/modules/synctex/synctex_parser.c:568:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(open.synctex)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:668:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (build_directory && strlen(build_directory)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:675:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(build_directory)+strlen(lpc)+2; /* One for the '/' and one for the '\0'. */ data/texworks-0.6.5/modules/synctex/synctex_parser.c:675:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(build_directory)+strlen(lpc)+2; /* One for the '/' and one for the '\0'. */ data/texworks-0.6.5/modules/synctex/synctex_parser.c:678:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size += strlen(output); data/texworks-0.6.5/modules/synctex/synctex_parser.c:692:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!SYNCTEX_IS_PATH_SEPARATOR(build_output[strlen(build_directory)-1])) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:693:41: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. if (build_output != strcat(build_output,"/")) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:736:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (NULL == (reader->output = (char *)_synctex_malloc(strlen(output)+1))){ data/texworks-0.6.5/modules/synctex/synctex_parser.c:3128:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (scanR->display_prompt+1<_synctex_display_prompt+strlen(_synctex_display_prompt)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:3918:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). remaining_len = strlen(the_string); /* All the_string should match */ data/texworks-0.6.5/modules/synctex/synctex_parser.c:5998:67: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). scanner->display_prompt = (char *)_synctex_display_prompt+strlen(_synctex_display_prompt)-1; data/texworks-0.6.5/modules/synctex/synctex_parser.c:6226:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strlen(_synctex_data_name(input))!=strlen(_synctex_data_name(other_input)) data/texworks-0.6.5/modules/synctex/synctex_parser.c:6226:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strlen(_synctex_data_name(input))!=strlen(_synctex_data_name(other_input)) data/texworks-0.6.5/modules/synctex/synctex_parser.c:6227:98: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || strncmp(_synctex_data_name(other_input),_synctex_data_name(input),strlen(_synctex_data_name(input))))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:6240:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t char_index = strlen(name); data/texworks-0.6.5/modules/synctex/synctex_parser.c:6254:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while((strlen(relative) > 0) && (strlen(ptr) > 0) && (*relative == *ptr)) data/texworks-0.6.5/modules/synctex/synctex_parser.c:6254:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while((strlen(relative) > 0) && (strlen(ptr) > 0) && (*relative == *ptr)) data/texworks-0.6.5/modules/synctex/synctex_parser.c:8436:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if ((result = (int)strlen(buffer))) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8506:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (magnification && strlen(magnification)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8516:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (x_offset && strlen(x_offset)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8525:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (y_offset && strlen(y_offset)) { data/texworks-0.6.5/modules/synctex/synctex_parser.c:8564:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char * copy = _synctex_malloc(strlen(name)+1); data/texworks-0.6.5/modules/synctex/synctex_parser.c:8565:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy(copy,name,strlen(name)+1); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:106:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result = vsprintf(buff, reason, arg) +strlen(prompt); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:118:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result = (int)strlen(buffer2); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:122:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result = (int)strlen(prompt); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:270:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(!strlen(name)) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:274:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(name)>2) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:285:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char * c = name+strlen(name); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:306:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(lpc)) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:307:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strchr(lpc,' ') && lpc[0]!='"' && lpc[strlen(lpc)-1]!='"') { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:312:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(src)<size) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:315:18: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if(dest != strncpy(dest,src,size)) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:321:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(dpc+1,dpc,strlen(dpc)+1); /* Also move the null terminating character. */ data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:323:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dpc[strlen(dpc)+1]='\0';/* Consistency test */ data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:324:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dpc[strlen(dpc)]='"'; data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:351:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(temp); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:369:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if((size = strlen(temp))>0) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:371:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if(dest != strncpy(dest,temp,size)) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:404:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(base_name)>0) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:429:21: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if(core_name != strncpy(core_name,base_name,size)) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:443:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(output)-strlen(base_name); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:443:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(output)-strlen(base_name); data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:451:20: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if(dir_name != strncpy(dir_name,output,size)) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:467:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(dir_name &&strlen(dir_name)>0) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:469:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(quoted_core_name && strlen(quoted_core_name)>0) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:474:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(quoted_core_name && strlen(quoted_core_name)>0) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:478:72: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(!_synctex_path_is_absolute(output) && build_directory && (size = strlen(build_directory))) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:482:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(quoted_core_name && strlen(quoted_core_name)>0) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:487:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(quoted_core_name && strlen(quoted_core_name)>0) { data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:553:26: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && 31 == fgetc(F) data/texworks-0.6.5/modules/synctex/synctex_parser_utils.c:555:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && 139 == fgetc(F)) { data/texworks-0.6.5/src/TWApp.cpp:411:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(osvi.szCSDVersion) > 0 ) { data/texworks-0.6.5/src/scripting/Script.cpp:202:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). value = prop.read(obj); data/texworks-0.6.5/src/scripting/ScriptAPI.cpp:66:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int ScriptAPI::strlen(const QString& str) const data/texworks-0.6.5/src/scripting/ScriptAPI.h:69:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int strlen(const QString& str) const override; data/texworks-0.6.5/src/scripting/ScriptAPIInterface.h:57:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). virtual int strlen(const QString& str) const = 0; data/texworks-0.6.5/unit-tests/MockScriptingAPI.h:59:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int strlen(const QString& str) const override { return str.length(); } data/texworks-0.6.5/unit-tests/Scripting_test.cpp:197:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). QCOMPARE(api.strlen(QStringLiteral("Test")), 4); ANALYSIS SUMMARY: Hits = 239 Lines analyzed = 47436 in approximately 1.29 seconds (36743 lines/second) Physical Source Lines of Code (SLOC) = 34084 Hits@level = [0] 193 [1] 62 [2] 125 [3] 8 [4] 44 [5] 0 Hits@level+ = [0+] 432 [1+] 239 [2+] 177 [3+] 52 [4+] 44 [5+] 0 Hits/KSLOC@level+ = [0+] 12.6746 [1+] 7.01209 [2+] 5.19305 [3+] 1.52564 [4+] 1.29093 [5+] 0 Dot directories skipped = 2 (--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.