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/klatexformula-4.0.0/src/klfapp.cpp Examining data/klatexformula-4.0.0/src/klfapp.h Examining data/klatexformula-4.0.0/src/klfautoupdater.h Examining data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp Examining data/klatexformula-4.0.0/src/klfbackend/klfbackend.h Examining data/klatexformula-4.0.0/src/klfbackend/klfbackend_p.h Examining data/klatexformula-4.0.0/src/klfbackend/klfblockprocess.cpp Examining data/klatexformula-4.0.0/src/klfbackend/klfblockprocess.h Examining data/klatexformula-4.0.0/src/klfbackend/klffilterprocess.cpp Examining data/klatexformula-4.0.0/src/klfbackend/klffilterprocess.h Examining data/klatexformula-4.0.0/src/klfbackend/klffilterprocess_p.h Examining data/klatexformula-4.0.0/src/klfbackend/klflatexpreviewthread.cpp Examining data/klatexformula-4.0.0/src/klfbackend/klflatexpreviewthread.h Examining data/klatexformula-4.0.0/src/klfbackend/klflatexpreviewthread_p.h Examining data/klatexformula-4.0.0/src/klfbackend/klfuserscript.cpp Examining data/klatexformula-4.0.0/src/klfbackend/klfuserscript.h Examining data/klatexformula-4.0.0/src/klfcmdiface.cpp Examining data/klatexformula-4.0.0/src/klfcmdiface.h Examining data/klatexformula-4.0.0/src/klfconfig.cpp Examining data/klatexformula-4.0.0/src/klfconfig.h Examining data/klatexformula-4.0.0/src/klfconfig_p.h Examining data/klatexformula-4.0.0/src/klfdbus.cpp Examining data/klatexformula-4.0.0/src/klfdbus.h Examining data/klatexformula-4.0.0/src/klfexporter.cpp Examining data/klatexformula-4.0.0/src/klfexporter.h Examining data/klatexformula-4.0.0/src/klfexporter_p.h Examining data/klatexformula-4.0.0/src/klflatexsymbols.cpp Examining data/klatexformula-4.0.0/src/klflatexsymbols.h Examining data/klatexformula-4.0.0/src/klflatexsymbols_p.h Examining data/klatexformula-4.0.0/src/klflib.cpp Examining data/klatexformula-4.0.0/src/klflib.h Examining data/klatexformula-4.0.0/src/klflib_p.h Examining data/klatexformula-4.0.0/src/klflibbrowser.cpp Examining data/klatexformula-4.0.0/src/klflibbrowser.h Examining data/klatexformula-4.0.0/src/klflibbrowser_p.h Examining data/klatexformula-4.0.0/src/klflibdbengine.cpp Examining data/klatexformula-4.0.0/src/klflibdbengine.h Examining data/klatexformula-4.0.0/src/klflibdbengine_p.h Examining data/klatexformula-4.0.0/src/klflibentryeditor.cpp Examining data/klatexformula-4.0.0/src/klflibentryeditor.h Examining data/klatexformula-4.0.0/src/klfliblegacyengine.cpp Examining data/klatexformula-4.0.0/src/klfliblegacyengine.h Examining data/klatexformula-4.0.0/src/klfliblegacyengine_p.h Examining data/klatexformula-4.0.0/src/klflibview.cpp Examining data/klatexformula-4.0.0/src/klflibview.h Examining data/klatexformula-4.0.0/src/klflibview_p.h Examining data/klatexformula-4.0.0/src/klfmain.cpp Examining data/klatexformula-4.0.0/src/klfmain.h Examining data/klatexformula-4.0.0/src/klfmainwin.cpp Examining data/klatexformula-4.0.0/src/klfmainwin.h Examining data/klatexformula-4.0.0/src/klfmainwin_p.h Examining data/klatexformula-4.0.0/src/klfmime.cpp Examining data/klatexformula-4.0.0/src/klfmime.h Examining data/klatexformula-4.0.0/src/klfmime_p.h Examining data/klatexformula-4.0.0/src/klfsettings.cpp Examining data/klatexformula-4.0.0/src/klfsettings.h Examining data/klatexformula-4.0.0/src/klfsettings_p.h Examining data/klatexformula-4.0.0/src/klfstyle.cpp Examining data/klatexformula-4.0.0/src/klfstyle.h Examining data/klatexformula-4.0.0/src/klfstylemanager.cpp Examining data/klatexformula-4.0.0/src/klfstylemanager.h Examining data/klatexformula-4.0.0/src/klftools/klfadvancedconfigeditor.h Examining data/klatexformula-4.0.0/src/klftools/klfadvancedconfigeditor_p.h Examining data/klatexformula-4.0.0/src/klftools/klfcolorchooser.cpp Examining data/klatexformula-4.0.0/src/klftools/klfcolorchooser.h Examining data/klatexformula-4.0.0/src/klftools/klfcolorchooser_p.h Examining data/klatexformula-4.0.0/src/klftools/klfconfigbase.cpp Examining data/klatexformula-4.0.0/src/klftools/klfconfigbase.h Examining data/klatexformula-4.0.0/src/klftools/klfdatautil.cpp Examining data/klatexformula-4.0.0/src/klftools/klfdatautil.h Examining data/klatexformula-4.0.0/src/klftools/klfdatautil_p.h Examining data/klatexformula-4.0.0/src/klftools/klfdebug.cpp Examining data/klatexformula-4.0.0/src/klftools/klfdebug.h Examining data/klatexformula-4.0.0/src/klftools/klfdefs.cpp Examining data/klatexformula-4.0.0/src/klftools/klfdefs.h Examining data/klatexformula-4.0.0/src/klftools/klfdefs_linux.cpp Examining data/klatexformula-4.0.0/src/klftools/klfdefs_win.cpp Examining data/klatexformula-4.0.0/src/klftools/klfdisplaylabel.cpp Examining data/klatexformula-4.0.0/src/klftools/klfdisplaylabel.h Examining data/klatexformula-4.0.0/src/klftools/klfenumlistwidget.cpp Examining data/klatexformula-4.0.0/src/klftools/klfenumlistwidget.h Examining data/klatexformula-4.0.0/src/klftools/klffactory.cpp Examining data/klatexformula-4.0.0/src/klftools/klffactory.h Examining data/klatexformula-4.0.0/src/klftools/klfflowlayout.cpp Examining data/klatexformula-4.0.0/src/klftools/klfflowlayout.h Examining data/klatexformula-4.0.0/src/klftools/klfflowlistwidget.cpp Examining data/klatexformula-4.0.0/src/klftools/klfflowlistwidget.h Examining data/klatexformula-4.0.0/src/klftools/klfflowlistwidget_p.h Examining data/klatexformula-4.0.0/src/klftools/klfguiutil.cpp Examining data/klatexformula-4.0.0/src/klftools/klfguiutil.h Examining data/klatexformula-4.0.0/src/klftools/klfitemviewsearchtarget.cpp Examining data/klatexformula-4.0.0/src/klftools/klfitemviewsearchtarget.h Examining data/klatexformula-4.0.0/src/klftools/klfitemviewsearchtarget_p.h Examining data/klatexformula-4.0.0/src/klftools/klfiteratorsearchable.h Examining data/klatexformula-4.0.0/src/klftools/klflatexedit.cpp Examining data/klatexformula-4.0.0/src/klftools/klflatexedit.h Examining data/klatexformula-4.0.0/src/klftools/klflatexedit_p.h Examining data/klatexformula-4.0.0/src/klftools/klfmacdefs.h Examining data/klatexformula-4.0.0/src/klftools/klfpathchooser.cpp Examining data/klatexformula-4.0.0/src/klftools/klfpathchooser.h Examining data/klatexformula-4.0.0/src/klftools/klfpixmapbutton.cpp Examining data/klatexformula-4.0.0/src/klftools/klfpixmapbutton.h Examining data/klatexformula-4.0.0/src/klftools/klfpobj.cpp Examining data/klatexformula-4.0.0/src/klftools/klfpobj.h Examining data/klatexformula-4.0.0/src/klftools/klfpobjeditwidget.cpp Examining data/klatexformula-4.0.0/src/klftools/klfpobjeditwidget.h Examining data/klatexformula-4.0.0/src/klftools/klfpobjeditwidget_p.h Examining data/klatexformula-4.0.0/src/klftools/klfprogerr.cpp Examining data/klatexformula-4.0.0/src/klftools/klfprogerr.h Examining data/klatexformula-4.0.0/src/klftools/klfrelativefont.cpp Examining data/klatexformula-4.0.0/src/klftools/klfrelativefont.h Examining data/klatexformula-4.0.0/src/klftools/klfsearchbar.cpp Examining data/klatexformula-4.0.0/src/klftools/klfsearchbar.h Examining data/klatexformula-4.0.0/src/klftools/klfsearchbar_p.h Examining data/klatexformula-4.0.0/src/klftools/klfsidewidget.cpp Examining data/klatexformula-4.0.0/src/klftools/klfsidewidget.h Examining data/klatexformula-4.0.0/src/klftools/klfsidewidget_p.h Examining data/klatexformula-4.0.0/src/klftools/klfsysinfo.cpp Examining data/klatexformula-4.0.0/src/klftools/klfsysinfo.h Examining data/klatexformula-4.0.0/src/klftools/klftools_desplugin.cpp Examining data/klatexformula-4.0.0/src/klftools/klftools_desplugin.h Examining data/klatexformula-4.0.0/src/klftools/klftools_desplugin_collection.cpp Examining data/klatexformula-4.0.0/src/klftools/klftools_desplugin_collection.h Examining data/klatexformula-4.0.0/src/klftools/klfunitinput.cpp Examining data/klatexformula-4.0.0/src/klftools/klfunitinput.h Examining data/klatexformula-4.0.0/src/klftools/klfutil.cpp Examining data/klatexformula-4.0.0/src/klftools/klfutil.h Examining data/klatexformula-4.0.0/src/klftools/qtcolortriangle.cpp Examining data/klatexformula-4.0.0/src/klftools/qtcolortriangle.h Examining data/klatexformula-4.0.0/src/klftools/klfdefs_otheros.cpp Examining data/klatexformula-4.0.0/src/klftools/klfadvancedconfigeditor.cpp Examining data/klatexformula-4.0.0/src/klfuiloader.cpp Examining data/klatexformula-4.0.0/src/klfuiloader.h Examining data/klatexformula-4.0.0/src/klfuiloader_p.h Examining data/klatexformula-4.0.0/src/macosx/klfmacclipboard.cpp Examining data/klatexformula-4.0.0/src/macosx/klfmacclipboard.h Examining data/klatexformula-4.0.0/src/macosx/klfsparkleupdater.h Examining data/klatexformula-4.0.0/src/main.cpp Examining data/klatexformula-4.0.0/src/modeltest.cpp Examining data/klatexformula-4.0.0/src/modeltest.h Examining data/klatexformula-4.0.0/src/mswin/klfwinclipboard.cpp Examining data/klatexformula-4.0.0/src/mswin/klfwinclipboard.h Examining data/klatexformula-4.0.0/src/mswin/klfwinsparkleupdater.cpp Examining data/klatexformula-4.0.0/src/mswin/klfwinsparkleupdater.h Examining data/klatexformula-4.0.0/src/x11/klfx11.cpp FINAL RESULTS: data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1505:5: [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(backgroundfillps, sizeof(backgroundfillps)-1, data/klatexformula-4.0.0/src/klfconfig.cpp:272:42: [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. KLFCONFIGPROP_INIT(UI.locale, QLocale::system().name()) ; data/klatexformula-4.0.0/src/klfconfig.cpp:273:38: [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. klfDbg("System locale: "<<QLocale::system().name()); data/klatexformula-4.0.0/src/klftools/klfdefs.cpp:1005:9: [4] (format) vsnprintf: 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. len = vsnprintf(buffer, bufferSize, fmt, pp); data/klatexformula-4.0.0/src/klftools/klfdefs.cpp:1013:9: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. len = vsprintf(buffer, fmt, pp); data/klatexformula-4.0.0/src/klftools/klfdefs.h:57:29: [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. __attribute__ ((format (printf, 1, 2))) data/klatexformula-4.0.0/src/klftools/klfsearchbar.cpp:137:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. s.sprintf("%p", (const void*)(const KLFPosSearchable::Pos::PosData*)pos.posdata); data/klatexformula-4.0.0/src/main.cpp:517:5: [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(fname, opt_redirect_debug); data/klatexformula-4.0.0/src/main.cpp:523:2: [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). strcat(fname, SUFFIX); data/klatexformula-4.0.0/src/main.cpp:795:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, KLF_WELCOME, KLF_VERSION_STRING); data/klatexformula-4.0.0/src/main.cpp:1001:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, KLF_WELCOME, KLF_VERSION_STRING); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1063: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. const char *env_gs_device = getenv("KLFBACKEND_GS_PS_DEVICE"); data/klatexformula-4.0.0/src/klftools/klfutil.cpp:265:31: [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. static const QString PATH = getenv("PATH"); data/klatexformula-4.0.0/src/klftools/klfutil.cpp:597:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *svalue = getenv(qPrintable(envvarname)); data/klatexformula-4.0.0/src/main.cpp:1276:9: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, klfcmdl_optstring, klfcmdl_optlist, NULL); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:662: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). bool r = file.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1173: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). buf.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1191: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). bool r = fpdfmarks.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1393: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). bool r = buf.open(QIODevice::ReadOnly | QIODevice::Text); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1401:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linebuffer[512]; data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1492:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1502:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char backgroundfillps[1024] = ""; data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1528:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer2[1024]; data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1585:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1741: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 ( ! fout.open(stdout, QIODevice::WriteOnly) ) { data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1751: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 ( ! fout.open(QIODevice::WriteOnly) ) { data/klatexformula-4.0.0/src/klfbackend/klfblockprocess.cpp:42: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 (!fpeek.open(QIODevice::ReadOnly)) { data/klatexformula-4.0.0/src/klfbackend/klffilterprocess.cpp:383: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). r = outfile.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfbackend/klfuserscript.cpp:150: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 ( ! fxml.open(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klfconfig.cpp:667: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). KLF_TRY( usfile.open(QIODevice::ReadOnly) , data/klatexformula-4.0.0/src/klfconfig.cpp:855: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). KLF_ASSERT_CONDITION( usfile.open(QIODevice::WriteOnly) , data/klatexformula-4.0.0/src/klfexporter_p.h:129: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). buffer.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfexporter_p.h:300: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). templfile.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfexporter_p.h:453: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). buffer.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfexporter_p.h:550: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). f_in.open(); data/klatexformula-4.0.0/src/klfexporter_p.h:698: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 (tempfile->open() == false) { data/klatexformula-4.0.0/src/klflatexsymbols.cpp:454: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 ( ! f.open(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klflatexsymbols.cpp:505: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 ( ! f.open(QIODevice::WriteOnly) ) { data/klatexformula-4.0.0/src/klflatexsymbols.cpp:917: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(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klflibdbengine.cpp:95: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). buf.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klflibdbengine.cpp:183: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 ( !db.open() || db.lastError().isValid() ) { data/klatexformula-4.0.0/src/klflibdbengine.cpp:225: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). r = db.open(); // go open (here create) the DB data/klatexformula-4.0.0/src/klflibdbengine.cpp:1239: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). buf.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klflibdbengine.cpp:1321: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). buf.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klflibdbengine.cpp:1735:9: [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 magic_sqlite_header[MAGIC_SQLITE_HEADER_LEN] data/klatexformula-4.0.0/src/klflibdbengine.cpp:1738:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[MAGIC_SQLITE_HEADER_LEN]; data/klatexformula-4.0.0/src/klflibdbengine.cpp:1746: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 ( ! f.open(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klfliblegacyengine.cpp:171: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 ( ! fimp.open(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klfliblegacyengine.cpp:258: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 ( ! fsav.open(QIODevice::WriteOnly) ) { data/klatexformula-4.0.0/src/klfliblegacyengine.cpp:980: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 ( ! f.open(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klfmainwin.cpp:954: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 ( ! fsty.open(QIODevice::ReadOnly) ) data/klatexformula-4.0.0/src/klfmainwin.cpp:1032: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 ( ! f.open(QIODevice::WriteOnly) ) { data/klatexformula-4.0.0/src/klfmainwin.cpp:1233: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 ( ! f.open(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klfmainwin.cpp:1273: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 ( ! f.open(QIODevice::WriteOnly) ) { data/klatexformula-4.0.0/src/klfmainwin.cpp:1807: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). QAction * a = parenDelimMenu->addAction(QString("%1 ... %2").arg(p.open, p.close), data/klatexformula-4.0.0/src/klfmainwin.cpp:1812: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). v["opendelim"] = p.open; data/klatexformula-4.0.0/src/klfmainwin.cpp:2140: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). uif.open(QFile::ReadOnly); data/klatexformula-4.0.0/src/klfmainwin.cpp:2190: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(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klfmainwin.cpp:2410: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). if (!f.open(QIODevice::ReadOnly)) { data/klatexformula-4.0.0/src/klfmainwin.cpp:3844: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). bool ok = fout.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfmainwin_p.h:83: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). f.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfmainwin_p.h:342: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). bool r = f.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfmainwin_p.h:378: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). buf.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfmainwin_p.h:430: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). bool r = f.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfmainwin_p.h:466: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). buf.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfmainwin_p.h:472:7: [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 sbuf[1024]; data/klatexformula-4.0.0/src/klfmainwin_p.h:653: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 (!buf.open(QIODevice::ReadOnly)) { data/klatexformula-4.0.0/src/klfmainwin_p.h:799: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 (!f.open(QIODevice::ReadOnly)) { data/klatexformula-4.0.0/src/klfmime.cpp:248: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(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/klfmime.cpp:1052: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). buf.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfmime.cpp:1106: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 (tempfile->open() == false) { data/klatexformula-4.0.0/src/klfmime.cpp:1216: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 (tempfile->open() == false) { data/klatexformula-4.0.0/src/klfmime.cpp:1388: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). templfile.open(QIODevice::ReadOnly); data/klatexformula-4.0.0/src/klfmime.cpp:1522: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). buf.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klfsettings.cpp:831: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). uif.open(QFile::ReadOnly); data/klatexformula-4.0.0/src/klftools/klfdatautil_p.h:113: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). buf.open(QIODevice::WriteOnly); data/klatexformula-4.0.0/src/klftools/klfdebug.cpp:66:25: [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 ( !(klf_fp_tty = fopen("/dev/tty", "w")) ) { data/klatexformula-4.0.0/src/klftools/klfdefs.cpp:1001:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[bufferSize]; data/klatexformula-4.0.0/src/klftools/klfdefs.cpp:1053:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[128]; data/klatexformula-4.0.0/src/klftools/klfdefs.cpp:1055:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%03ld.%06ld", (ulong)tv.tv_sec % 1000, (ulong)tv.tv_usec); data/klatexformula-4.0.0/src/klftools/klfdefs.cpp:1057:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%ld.%06ld", (ulong)tv.tv_sec, (ulong)tv.tv_usec); data/klatexformula-4.0.0/src/klftools/klfdefs_linux.cpp:78: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(QIODevice::ReadOnly)) { data/klatexformula-4.0.0/src/klftools/klfdisplaylabel.cpp:175: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). if ( ! mToolTipFile->open() ) { data/klatexformula-4.0.0/src/klftools/klflatexedit.cpp:70:31: [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). openParenListCache << p.open; data/klatexformula-4.0.0/src/klftools/klflatexedit.h:134: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). ParenSpec(const QString& o, const QString& c, uint f = 0x00) : open(o), close(c), flags(f) { } data/klatexformula-4.0.0/src/klftools/klflatexedit.h:135: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). QString open; data/klatexformula-4.0.0/src/klftools/klflatexedit_p.h:95:29: [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 (a_ch == pslist[k].open) data/klatexformula-4.0.0/src/main.cpp:145:1: [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 *qt_argv[1024]; data/klatexformula-4.0.0/src/main.cpp:149:1: [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 *opt_strdup_free_list[64] = { NULL }; data/klatexformula-4.0.0/src/main.cpp:266:10: [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). ftty = fopen("/dev/tty", "w"); data/klatexformula-4.0.0/src/main.cpp:364: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 ( ! f.open(stdin, QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/main.cpp:370: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 ( ! f.open(QIODevice::ReadOnly) ) { data/klatexformula-4.0.0/src/main.cpp:515: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 fname[1024]; data/klatexformula-4.0.0/src/main.cpp:528:20: [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 * klffp = fopen(fname, "w"); data/klatexformula-4.0.0/src/main.cpp:991: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 (!cmdlHelpFile.open(QIODevice::ReadOnly)) { data/klatexformula-4.0.0/src/main.cpp:1147:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int fd = atoi(&arg[1]); data/klatexformula-4.0.0/src/main.cpp:1160:10: [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). fp = fopen(arg, "a"); data/klatexformula-4.0.0/src/main.cpp:1262:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char klfcmdl_optstring[1024]; data/klatexformula-4.0.0/src/main.cpp:1347:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). opt_dpi = atoi(arg); data/klatexformula-4.0.0/src/main.cpp:1400:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). opt_lborderoffset = atoi(arg); data/klatexformula-4.0.0/src/main.cpp:1403:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). opt_tborderoffset = atoi(arg); data/klatexformula-4.0.0/src/main.cpp:1406:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). opt_rborderoffset = atoi(arg); data/klatexformula-4.0.0/src/main.cpp:1409:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). opt_bborderoffset = atoi(arg); data/klatexformula-4.0.0/src/mswin/klfwinclipboard.cpp:193:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(out, data.data(), size_t(data.size())); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1387: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). static const int hibboxtaglen = strlen(hibboxtag); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1388:33: [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). static const int bboxtaglen = strlen(bboxtag); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1464: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). static int bboxdecl_len = strlen(bboxdecl); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1500: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). buffer_len = strlen(buffer); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1564:12: [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). i2 += strlen(endsetupstr); data/klatexformula-4.0.0/src/klfbackend/klfbackend.cpp:1949:7: [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). k += strlen(availdevstr); // point to after 'available devices:' string data/klatexformula-4.0.0/src/klflibdbengine.cpp:1751:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int len = f.read(header, MAGIC_SQLITE_HEADER_LEN); data/klatexformula-4.0.0/src/klflibview.cpp:1496: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). if (indent < (signed)strlen(sindent)) data/klatexformula-4.0.0/src/klfmainwin.cpp:1578:31: [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). QByteArray data = s.mid(strlen("preambleCmdStringList:")).toLatin1(); data/klatexformula-4.0.0/src/klfmainwin.cpp:2954: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). n = n.mid(strlen("INPUT_")); data/klatexformula-4.0.0/src/klfmainwin.cpp:4177:17: [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). n = n.mid(strlen("INPUT_")); data/klatexformula-4.0.0/src/klfmainwin_p.h:533:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *img = imagereader->read(); data/klatexformula-4.0.0/src/klfmainwin_p.h:673:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QByteArray value = buf.read(vallen); data/klatexformula-4.0.0/src/klfmainwin_p.h:813: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). styledata += line.mid(strlen("%%KLF:style: ")); data/klatexformula-4.0.0/src/klfsettings.cpp:859: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). n = n.mid(strlen("INPUT_")); data/klatexformula-4.0.0/src/klfsettings.cpp:891: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). n = n.mid(strlen("INPUT_")); data/klatexformula-4.0.0/src/klftools/klfdatautil.cpp:558: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). if (strlen(klf_brush_styles[k].style)) data/klatexformula-4.0.0/src/klftools/klfdatautil.cpp:834:37: [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). QByteArray vdata_esc = data.mid(strlen("[QVariant]")); data/klatexformula-4.0.0/src/klftools/klfdatautil_p.h:38: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). strlen("qCompressedXML")+1); // _WITH_ '\0' data/klatexformula-4.0.0/src/klftools/klfdefs_linux.cpp:53: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). if (!strncmp(d.machine, "ppc", strlen("ppc"))) { data/klatexformula-4.0.0/src/main.cpp:357: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 (latexinput != NULL && strlen(latexinput) != 0) { data/klatexformula-4.0.0/src/main.cpp:360: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). if (input != NULL && strlen(input) != 0) { data/klatexformula-4.0.0/src/main.cpp:407:17: [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 (nindent < strlen(sindent)) data/klatexformula-4.0.0/src/main.cpp:518:9: [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(fname) < strlen(SUFFIX) || data/klatexformula-4.0.0/src/main.cpp:518: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). if (strlen(fname) < strlen(SUFFIX) || data/klatexformula-4.0.0/src/main.cpp:519:17: [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(fname+(strlen(fname)-strlen(SUFFIX)), SUFFIX, strlen(SUFFIX)) != 0) { data/klatexformula-4.0.0/src/main.cpp:519:31: [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(fname+(strlen(fname)-strlen(SUFFIX)), SUFFIX, strlen(SUFFIX)) != 0) { data/klatexformula-4.0.0/src/main.cpp:519:56: [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(fname+(strlen(fname)-strlen(SUFFIX)), SUFFIX, strlen(SUFFIX)) != 0) { data/klatexformula-4.0.0/src/main.cpp:522: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). if (strlen(fname) < strlen("/dev/") || strncmp(fname, "/dev/", strlen("/dev/")) != 0) { data/klatexformula-4.0.0/src/main.cpp:522:27: [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(fname) < strlen("/dev/") || strncmp(fname, "/dev/", strlen("/dev/")) != 0) { data/klatexformula-4.0.0/src/main.cpp:522:70: [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(fname) < strlen("/dev/") || strncmp(fname, "/dev/", strlen("/dev/")) != 0) { data/klatexformula-4.0.0/src/main.cpp:1026:33: [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 ( (opt_input == NULL || !strlen(opt_input)) && data/klatexformula-4.0.0/src/main.cpp:1027:31: [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). (opt_latexinput == NULL || !strlen(opt_latexinput)) ) { ANALYSIS SUMMARY: Hits = 137 Lines analyzed = 67626 in approximately 3.16 seconds (21434 lines/second) Physical Source Lines of Code (SLOC) = 42498 Hits@level = [0] 28 [1] 33 [2] 89 [3] 4 [4] 11 [5] 0 Hits@level+ = [0+] 165 [1+] 137 [2+] 104 [3+] 15 [4+] 11 [5+] 0 Hits/KSLOC@level+ = [0+] 3.88254 [1+] 3.22368 [2+] 2.44717 [3+] 0.352958 [4+] 0.258836 [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.