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/focuswriter-1.7.6/resources/symbols/main.cpp Examining data/focuswriter-1.7.6/src/action_manager.cpp Examining data/focuswriter-1.7.6/src/action_manager.h Examining data/focuswriter-1.7.6/src/alert.cpp Examining data/focuswriter-1.7.6/src/alert.h Examining data/focuswriter-1.7.6/src/alert_layer.cpp Examining data/focuswriter-1.7.6/src/alert_layer.h Examining data/focuswriter-1.7.6/src/application.cpp Examining data/focuswriter-1.7.6/src/application.h Examining data/focuswriter-1.7.6/src/block_stats.cpp Examining data/focuswriter-1.7.6/src/block_stats.h Examining data/focuswriter-1.7.6/src/color_button.cpp Examining data/focuswriter-1.7.6/src/color_button.h Examining data/focuswriter-1.7.6/src/daily_progress.cpp Examining data/focuswriter-1.7.6/src/daily_progress.h Examining data/focuswriter-1.7.6/src/daily_progress_dialog.cpp Examining data/focuswriter-1.7.6/src/daily_progress_dialog.h Examining data/focuswriter-1.7.6/src/daily_progress_label.cpp Examining data/focuswriter-1.7.6/src/daily_progress_label.h Examining data/focuswriter-1.7.6/src/deltas.cpp Examining data/focuswriter-1.7.6/src/deltas.h Examining data/focuswriter-1.7.6/src/document.cpp Examining data/focuswriter-1.7.6/src/document.h Examining data/focuswriter-1.7.6/src/document_cache.cpp Examining data/focuswriter-1.7.6/src/document_cache.h Examining data/focuswriter-1.7.6/src/document_watcher.cpp Examining data/focuswriter-1.7.6/src/document_watcher.h Examining data/focuswriter-1.7.6/src/document_writer.cpp Examining data/focuswriter-1.7.6/src/document_writer.h Examining data/focuswriter-1.7.6/src/fileformats/clipboard_mac.cpp Examining data/focuswriter-1.7.6/src/fileformats/clipboard_mac.h Examining data/focuswriter-1.7.6/src/fileformats/clipboard_windows.cpp Examining data/focuswriter-1.7.6/src/fileformats/clipboard_windows.h Examining data/focuswriter-1.7.6/src/fileformats/docx_reader.cpp Examining data/focuswriter-1.7.6/src/fileformats/docx_reader.h Examining data/focuswriter-1.7.6/src/fileformats/docx_writer.cpp Examining data/focuswriter-1.7.6/src/fileformats/docx_writer.h Examining data/focuswriter-1.7.6/src/fileformats/format_manager.cpp Examining data/focuswriter-1.7.6/src/fileformats/format_manager.h Examining data/focuswriter-1.7.6/src/fileformats/format_reader.h Examining data/focuswriter-1.7.6/src/fileformats/odt_reader.cpp Examining data/focuswriter-1.7.6/src/fileformats/odt_reader.h Examining data/focuswriter-1.7.6/src/fileformats/odt_writer.cpp Examining data/focuswriter-1.7.6/src/fileformats/odt_writer.h Examining data/focuswriter-1.7.6/src/fileformats/rtf_reader.cpp Examining data/focuswriter-1.7.6/src/fileformats/rtf_reader.h Examining data/focuswriter-1.7.6/src/fileformats/rtf_tokenizer.cpp Examining data/focuswriter-1.7.6/src/fileformats/rtf_tokenizer.h Examining data/focuswriter-1.7.6/src/fileformats/rtf_writer.cpp Examining data/focuswriter-1.7.6/src/fileformats/rtf_writer.h Examining data/focuswriter-1.7.6/src/fileformats/txt_reader.cpp Examining data/focuswriter-1.7.6/src/fileformats/txt_reader.h Examining data/focuswriter-1.7.6/src/find_dialog.cpp Examining data/focuswriter-1.7.6/src/find_dialog.h Examining data/focuswriter-1.7.6/src/font_combobox.cpp Examining data/focuswriter-1.7.6/src/font_combobox.h Examining data/focuswriter-1.7.6/src/gzip.cpp Examining data/focuswriter-1.7.6/src/gzip.h Examining data/focuswriter-1.7.6/src/image_button.cpp Examining data/focuswriter-1.7.6/src/image_button.h Examining data/focuswriter-1.7.6/src/load_screen.cpp Examining data/focuswriter-1.7.6/src/load_screen.h Examining data/focuswriter-1.7.6/src/locale_dialog.cpp Examining data/focuswriter-1.7.6/src/locale_dialog.h Examining data/focuswriter-1.7.6/src/main.cpp Examining data/focuswriter-1.7.6/src/paths.cpp Examining data/focuswriter-1.7.6/src/paths.h Examining data/focuswriter-1.7.6/src/preferences.cpp Examining data/focuswriter-1.7.6/src/preferences.h Examining data/focuswriter-1.7.6/src/preferences_dialog.cpp Examining data/focuswriter-1.7.6/src/preferences_dialog.h Examining data/focuswriter-1.7.6/src/qtsingleapplication/qtlocalpeer.cpp Examining data/focuswriter-1.7.6/src/qtsingleapplication/qtlocalpeer.h Examining data/focuswriter-1.7.6/src/qtsingleapplication/qtsingleapplication.cpp Examining data/focuswriter-1.7.6/src/qtsingleapplication/qtsingleapplication.h Examining data/focuswriter-1.7.6/src/qtzip/qtzip.cpp Examining data/focuswriter-1.7.6/src/qtzip/qtzipreader.h Examining data/focuswriter-1.7.6/src/qtzip/qtzipwriter.h Examining data/focuswriter-1.7.6/src/ranged_int.h Examining data/focuswriter-1.7.6/src/ranged_string.h Examining data/focuswriter-1.7.6/src/scene_list.cpp Examining data/focuswriter-1.7.6/src/scene_list.h Examining data/focuswriter-1.7.6/src/scene_model.cpp Examining data/focuswriter-1.7.6/src/scene_model.h Examining data/focuswriter-1.7.6/src/session.cpp Examining data/focuswriter-1.7.6/src/session.h Examining data/focuswriter-1.7.6/src/session_manager.cpp Examining data/focuswriter-1.7.6/src/session_manager.h Examining data/focuswriter-1.7.6/src/settings_file.h Examining data/focuswriter-1.7.6/src/shortcut_edit.cpp Examining data/focuswriter-1.7.6/src/shortcut_edit.h Examining data/focuswriter-1.7.6/src/smart_quotes.cpp Examining data/focuswriter-1.7.6/src/smart_quotes.h Examining data/focuswriter-1.7.6/src/sound.cpp Examining data/focuswriter-1.7.6/src/sound.h Examining data/focuswriter-1.7.6/src/spelling/abstract_dictionary.h Examining data/focuswriter-1.7.6/src/spelling/abstract_dictionary_provider.h Examining data/focuswriter-1.7.6/src/spelling/dictionary_dialog.cpp Examining data/focuswriter-1.7.6/src/spelling/dictionary_dialog.h Examining data/focuswriter-1.7.6/src/spelling/dictionary_manager.cpp Examining data/focuswriter-1.7.6/src/spelling/dictionary_manager.h Examining data/focuswriter-1.7.6/src/spelling/dictionary_provider_hunspell.cpp Examining data/focuswriter-1.7.6/src/spelling/dictionary_provider_hunspell.h Examining data/focuswriter-1.7.6/src/spelling/dictionary_provider_nsspellchecker.h Examining data/focuswriter-1.7.6/src/spelling/dictionary_provider_voikko.cpp Examining data/focuswriter-1.7.6/src/spelling/dictionary_provider_voikko.h Examining data/focuswriter-1.7.6/src/spelling/dictionary_ref.h Examining data/focuswriter-1.7.6/src/spelling/highlighter.cpp Examining data/focuswriter-1.7.6/src/spelling/highlighter.h Examining data/focuswriter-1.7.6/src/spelling/hunspell/affentry.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/filemgr.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.h Examining data/focuswriter-1.7.6/src/spelling/hunspell/hunvisapi.h Examining data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/phonet.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/replist.cxx Examining data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx Examining data/focuswriter-1.7.6/src/spelling/spell_checker.cpp Examining data/focuswriter-1.7.6/src/spelling/spell_checker.h Examining data/focuswriter-1.7.6/src/stack.cpp Examining data/focuswriter-1.7.6/src/stack.h Examining data/focuswriter-1.7.6/src/stats.cpp Examining data/focuswriter-1.7.6/src/stats.h Examining data/focuswriter-1.7.6/src/symbols_dialog.cpp Examining data/focuswriter-1.7.6/src/symbols_dialog.h Examining data/focuswriter-1.7.6/src/symbols_model.cpp Examining data/focuswriter-1.7.6/src/symbols_model.h Examining data/focuswriter-1.7.6/src/theme.cpp Examining data/focuswriter-1.7.6/src/theme.h Examining data/focuswriter-1.7.6/src/theme_dialog.cpp Examining data/focuswriter-1.7.6/src/theme_dialog.h Examining data/focuswriter-1.7.6/src/theme_manager.cpp Examining data/focuswriter-1.7.6/src/theme_manager.h Examining data/focuswriter-1.7.6/src/theme_renderer.cpp Examining data/focuswriter-1.7.6/src/theme_renderer.h Examining data/focuswriter-1.7.6/src/timer.cpp Examining data/focuswriter-1.7.6/src/timer.h Examining data/focuswriter-1.7.6/src/timer_display.cpp Examining data/focuswriter-1.7.6/src/timer_display.h Examining data/focuswriter-1.7.6/src/timer_manager.cpp Examining data/focuswriter-1.7.6/src/timer_manager.h Examining data/focuswriter-1.7.6/src/utils.cpp Examining data/focuswriter-1.7.6/src/utils.h Examining data/focuswriter-1.7.6/src/window.cpp Examining data/focuswriter-1.7.6/src/window.h FINAL RESULTS: data/focuswriter-1.7.6/src/font_combobox.cpp:41:66: [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. void FontComboBox::setWritingSystem(QFontDatabase::WritingSystem system) data/focuswriter-1.7.6/src/font_combobox.cpp:43:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. m_system = system; data/focuswriter-1.7.6/src/font_combobox.h:44:53: [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. void setWritingSystem(QFontDatabase::WritingSystem system); data/focuswriter-1.7.6/src/spelling/hunspell/affentry.cxx:938:64: [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 we set up a conds array of 256 bytes indexed (0 to 255) and access it data/focuswriter-1.7.6/src/spelling/hunspell/filemgr.cxx:79:3: [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, err, par); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:238:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hpw, word->c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:257:7: [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(hpw + word->size() + 1, desc->c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:54:3: [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, err, par); data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:250: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(linebuf + l - 1, line + strlen(line) - right - 1); data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:253:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(line + left, linebuf); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:800:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(candidate + 1, word); data/focuswriter-1.7.6/resources/symbols/main.cpp:117:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QFile::WriteOnly | QFile::Text)) { data/focuswriter-1.7.6/resources/symbols/main.cpp:136: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::ReadOnly | QFile::Text)) { data/focuswriter-1.7.6/resources/symbols/main.cpp:164: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::ReadOnly | QFile::Text)) { data/focuswriter-1.7.6/resources/symbols/main.cpp:211: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::ReadOnly | QFile::Text)) { data/focuswriter-1.7.6/resources/symbols/main.cpp:267: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 (!buffer.open(QIODevice::WriteOnly)) { data/focuswriter-1.7.6/resources/symbols/main.cpp:279: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/focuswriter-1.7.6/src/document.cpp:140: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). buffer.open(QIODevice::WriteOnly); data/focuswriter-1.7.6/src/document.cpp:149: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). buffer.open(QIODevice::WriteOnly); data/focuswriter-1.7.6/src/document.cpp:158: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). buffer.open(QIODevice::WriteOnly); data/focuswriter-1.7.6/src/document.cpp:190: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). buffer.open(QIODevice::ReadOnly); data/focuswriter-1.7.6/src/document.cpp:196: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). buffer.open(QIODevice::ReadOnly); data/focuswriter-1.7.6/src/document.cpp:215: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). buffer.open(QIODevice::ReadOnly); data/focuswriter-1.7.6/src/document.cpp:298: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). buffer.open(QIODevice::WriteOnly); data/focuswriter-1.7.6/src/document.cpp:798:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QIODevice::ReadOnly)) { data/focuswriter-1.7.6/src/document_cache.cpp:80:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QFile::ReadOnly | QFile::Text)) { data/focuswriter-1.7.6/src/document_cache.cpp:142:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QFile::WriteOnly | QFile::Text)) { data/focuswriter-1.7.6/src/document_writer.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 (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { data/focuswriter-1.7.6/src/fileformats/clipboard_windows.cpp:64:3: [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(data_ptr, data.data(), data.size()); data/focuswriter-1.7.6/src/fileformats/clipboard_windows.cpp:96:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/focuswriter-1.7.6/src/fileformats/docx_writer.cpp:170: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). buffer.open(QIODevice::WriteOnly); data/focuswriter-1.7.6/src/fileformats/odt_writer.cpp:123: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). buffer.open(QIODevice::WriteOnly); data/focuswriter-1.7.6/src/fileformats/odt_writer.cpp:155: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). buffer.open(QIODevice::WriteOnly); data/focuswriter-1.7.6/src/fileformats/rtf_writer.cpp:198:2: [2] (buffer) TCHAR: 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. TCHAR buffer[7]; data/focuswriter-1.7.6/src/gzip.cpp:34: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/focuswriter-1.7.6/src/gzip.cpp:40: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::WriteOnly)) { data/focuswriter-1.7.6/src/gzip.cpp:59: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/focuswriter-1.7.6/src/gzip.cpp:68:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[buffer_size]; data/focuswriter-1.7.6/src/preferences_dialog.cpp:486: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 (out.open(QIODevice::WriteOnly)) { data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:556: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). if (! (device->isOpen() || device->open(QIODevice::ReadOnly))) { data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:650: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). if (! (device->isOpen() || device->open(QIODevice::WriteOnly))) { data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:818: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). const bool result = f->open(mode); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:1065: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 (!f.open(QIODevice::WriteOnly)) data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:1139: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(mode) && f->error() == QFile::NoError) data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:1308: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 (! device->open(QIODevice::ReadOnly)) { data/focuswriter-1.7.6/src/spelling/dictionary_manager.cpp:275:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { data/focuswriter-1.7.6/src/spelling/dictionary_manager.cpp:300:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { data/focuswriter-1.7.6/src/spelling/hunspell/affentry.cxx:888:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char conds[SETSIZE]; // array which encodes the conditions to be met data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:248: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 dupflags[CONTSIZE]; data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:1048: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(entry.c.conds, cs, short_part); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:3715:10: [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). *out = atoi(s.c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:3732:26: [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). cpdmaxsyllable = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:3786: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). numrl = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:3878:15: [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). num = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:3971:23: [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). numcheckcpd = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:4068:21: [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). numdefcpd = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:4171:18: [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). nummap = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:4273:20: [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). numbreak = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:4481:19: [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). numents = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:4609: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). int index = atoi(dash_str.c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:4679:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int index = atoi(chunk.c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:120:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:123:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:125: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). stream.open(buff2, mode); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:132: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). stream.open(path, mode); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:304:7: [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(d, s, sl); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:438:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char c(beg[i]); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:606:3: [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(dest, &source, sizeof(char*)); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:612:3: [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(&p, s, sizeof(char*)); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:255:56: [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). store_pointer(hpw + word->size() + 1, get_aliasm(atoi(desc->c_str()))); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:442:7: [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(flags2, flags, flagslen * sizeof(unsigned short)); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:543:9: [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((void*)flags, (void*)dp->astr, data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:590:15: [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). tablesize = atoi(ts.c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:669:21: [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 index = atoi(ap.c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:754:19: [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 i = atoi(src); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:767:15: [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 i = atoi(src); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:785:7: [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(*result, &w[0], len * sizeof(short)); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:827:19: [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 i = atoi(src); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:839:15: [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 i = atoi(src); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:856:7: [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(&result[origsize], &w[0], len * sizeof(short)); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:877:11: [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). i = atoi(f); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:887:11: [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(&s, &w[0], 1 * sizeof(short)); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:1068:21: [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). numaliasf = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:1197:21: [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). numaliasm = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/hashmgr.cxx:1310:18: [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). numrep = atoi(std::string(start_piece, iter).c_str()); data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:69: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. unsigned char c[2]; data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:208: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 linebuf[BUFSIZE]; data/focuswriter-1.7.6/src/spelling/hunspell/phonet.cxx:81: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 word[MAXPHONETUTF8LEN + 1]; data/focuswriter-1.7.6/src/symbols_model.cpp:55: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/focuswriter-1.7.6/src/symbols_model.cpp:62: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 (!buffer.open(QBuffer::ReadOnly)) { data/focuswriter-1.7.6/src/theme.cpp:86: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/focuswriter-1.7.6/src/theme.cpp:474:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QFile::ReadOnly)) { data/focuswriter-1.7.6/src/theme_manager.cpp:349: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::WriteOnly)) { data/focuswriter-1.7.6/src/theme_manager.cpp:377: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()) { data/focuswriter-1.7.6/src/theme_manager.cpp:431: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::ReadOnly)) { data/focuswriter-1.7.6/src/utils.cpp:39: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 (file1.open(QFile::ReadOnly) && file2.open(QFile::ReadOnly)) { data/focuswriter-1.7.6/src/utils.cpp:39: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). if (file1.open(QFile::ReadOnly) && file2.open(QFile::ReadOnly)) { data/focuswriter-1.7.6/src/document.cpp:192:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). reader.read(&buffer, cursor); data/focuswriter-1.7.6/src/document.cpp:198:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). reader.read(&buffer, cursor); data/focuswriter-1.7.6/src/document.cpp:216:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). reader.read(&buffer, cursor); data/focuswriter-1.7.6/src/document.cpp:812:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). reader->read(&file, document); data/focuswriter-1.7.6/src/fileformats/format_reader.h:50:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(QIODevice* device, QTextDocument* document) data/focuswriter-1.7.6/src/fileformats/format_reader.h:56:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(QIODevice* device, const QTextCursor& cursor) data/focuswriter-1.7.6/src/fileformats/rtf_tokenizer.cpp:149:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int size = m_device->read(m_buffer.data(), m_buffer.size()); data/focuswriter-1.7.6/src/fileformats/txt_reader.cpp:48:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_cursor.insertText(stream.read(0x4000)); data/focuswriter-1.7.6/src/gzip.cpp:72:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). data.append(buffer, read); data/focuswriter-1.7.6/src/gzip.cpp:74:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } while (read > 0); data/focuswriter-1.7.6/src/image_button.cpp:60:83: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). painter.drawImage((edge - size.width()) / 2, (edge - size.height()) / 2, source.read()); data/focuswriter-1.7.6/src/qtsingleapplication/qtlocalpeer.cpp:153:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res &= (socket.read(qstrlen(ack)) == ack); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:568:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). device->read((char *)tmp, 4); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:587:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). device->read((char *)&eod, sizeof(EndOfDirectory)); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:600:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). comment = device->read(qMin(comment_length, i)); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:606:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read = device->read((char *) &header.h, sizeof(CentralFileHeader)); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:607:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read < (int)sizeof(CentralFileHeader)) { data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:617:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). header.file_name = device->read(l); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:623:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). header.extra_field = device->read(l); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:629:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). header.file_comment = device->read(l); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:968:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d->device->read((char *)&lh, sizeof(LocalFileHeader)); data/focuswriter-1.7.6/src/qtzip/qtzip.cpp:981:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QByteArray compressed = d->device->read(compressed_size); data/focuswriter-1.7.6/src/spelling/hunspell/affentry.cxx:960:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (read that only 8 character positions) can be examined at one data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:772: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). if (strlen(key) == 0) { data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:838: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). if (strlen(key) == 0) { data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:1046: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). const size_t cslen = strlen(cs); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:1958: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). ? affix_check((word.c_str() + i), strlen(word.c_str() + i), compoundflag, data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:1964:52: [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). rv = affix_check((word.c_str() + i), strlen(word.c_str() + i), compoundend, data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:1969:52: [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). rv = affix_check((word.c_str() + i), strlen(word.c_str() + i), 0, IN_CPD_END); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2557: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). rv = affix_check((word + i), strlen(word + i), compoundflag); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2564: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). rv = affix_check((word + i), strlen(word + i), compoundend); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2568: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). rv = affix_check((word + i), strlen(word + i), 0, IN_CPD_END); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2572:49: [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). m = affix_check_morph((word + i), strlen(word + i), compoundflag); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2574:49: [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). m = affix_check_morph((word + i), strlen(word + i), compoundend); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2664:47: [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). m = affix_check_morph((word + i), strlen(word + i), compoundflag); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2666:47: [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). m = affix_check_morph((word + i), strlen(word + i), compoundend); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:2686:44: [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). compound_check_morph((word + i), strlen(word + i), wordnum + 1, data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:3430: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). int l1 = strlen(wlst[j].word); data/focuswriter-1.7.6/src/spelling/hunspell/affixmgr.cxx:4754: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). int condl = strlen(cond); data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:301: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). size_t sl = strlen(s) + 1; data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:2325:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read; data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:2327:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Tie(result, read, written) = data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:2329:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (result != kInputEmpty || read != 1 || written != 1) { data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:2334:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Tie(result, read, written) = data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:2336:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (result != kInputEmpty || read != 1 || written != 1) { data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:2342:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Tie(result, read, written) = data/focuswriter-1.7.6/src/spelling/hunspell/csutil.cxx:2344:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (result != kInputEmpty || read != 1 || written != 1) { data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:273: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). int nl = strlen(q); data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:310: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). int nl = strlen((const char*)q); data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:1129: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 slen = strlen(space + 1); data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:1777: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). p += strlen(attr); data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:1779: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). return p + strlen(attr); data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:1797:38: [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). std::string cw = get_xml_par(p + strlen(tag) - 1); data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:1907: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). len = strlen(word); data/focuswriter-1.7.6/src/spelling/hunspell/hunspell.cxx:2018:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, d.c_str(), destsize); data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:82:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(in, 3) || data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:93:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(c), 1)) data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:104:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(c), 2)) data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:122:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(c), 2)) data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:132:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(&l), 1)) data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:139:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(in, l / 8 + 1)) data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:180:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fin.read(in, BUFSIZE); data/focuswriter-1.7.6/src/spelling/hunspell/hunzip.cxx:250:36: [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). strcpy(linebuf + l - 1, line + strlen(line) - right - 1); data/focuswriter-1.7.6/src/spelling/hunspell/phonet.cxx:82:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(word, inword.c_str(), MAXPHONETUTF8LEN); data/focuswriter-1.7.6/src/spelling/hunspell/replist.cxx:122: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). if (strlen(word) == dat[ind]->pattern.size()) data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:126: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). ckeyl = strlen(ckey); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:133: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). ctryl = strlen(ctry); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:386: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). int wl = strlen(word); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:455: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). int wl = strlen(word); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:464:52: [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 (r - word + reptable[i].pattern.size() == strlen(word)) data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:511: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). int wl = strlen(word); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:792: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). int wl = strlen(word); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:1120: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). int nc = strlen(word); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:1440: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). len = strlen(guess[i]); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:1525: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). len = strlen(rootsphon[i]); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:2065: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). int l1 = strlen(s1); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:2066: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). int l2 = strlen(s2); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:2150: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). return strlen(word); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:2197: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). m = strlen(s); data/focuswriter-1.7.6/src/spelling/hunspell/suggestmgr.cxx:2198: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). n = strlen(s2); data/focuswriter-1.7.6/src/theme.cpp:57:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). painter.drawImage(0, 0, reader.read()); data/focuswriter-1.7.6/src/theme.cpp:395:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QImage back = source.read(); data/focuswriter-1.7.6/src/utils.cpp:41:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file1.read(1000) != file2.read(1000)) { data/focuswriter-1.7.6/src/utils.cpp:41:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file1.read(1000) != file2.read(1000)) { data/focuswriter-1.7.6/src/utils.cpp:51:9: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return equal; ANALYSIS SUMMARY: Hits = 182 Lines analyzed = 44383 in approximately 1.27 seconds (34943 lines/second) Physical Source Lines of Code (SLOC) = 31889 Hits@level = [0] 1 [1] 85 [2] 86 [3] 0 [4] 11 [5] 0 Hits@level+ = [0+] 183 [1+] 182 [2+] 97 [3+] 11 [4+] 11 [5+] 0 Hits/KSLOC@level+ = [0+] 5.73866 [1+] 5.7073 [2+] 3.0418 [3+] 0.344947 [4+] 0.344947 [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.