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/fqterm-0.9.10.1/src/common/common.cpp Examining data/fqterm-0.9.10.1/src/common/common.h Examining data/fqterm-0.9.10.1/src/common/fqterm.h Examining data/fqterm-0.9.10.1/src/common/fqterm_config.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_config.h Examining data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.h Examining data/fqterm-0.9.10.1/src/common/fqterm_filedialog.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_filedialog.h Examining data/fqterm-0.9.10.1/src/common/fqterm_font.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_font.h Examining data/fqterm-0.9.10.1/src/common/fqterm_param.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_param.h Examining data/fqterm-0.9.10.1/src/common/fqterm_path.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_path.h Examining data/fqterm-0.9.10.1/src/common/fqterm_shortcuthelper.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_shortcuthelper.h Examining data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_sound.h Examining data/fqterm-0.9.10.1/src/common/fqterm_trace.cpp Examining data/fqterm-0.9.10.1/src/common/fqterm_trace.h Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/dotnetstyle.cpp Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/dotnetstyle.h Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/qxtglobal.h Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/qxtglobalshortcut.cpp Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/qxtglobalshortcut.h Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/qxtglobalshortcut_mac.cpp Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/qxtglobalshortcut_p.h Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/qxtglobalshortcut_win.cpp Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/qxtglobalshortcut_x11.cpp Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/uaocodec.cpp Examining data/fqterm-0.9.10.1/src/fqterm/3rdparty/uaocodec.h Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_frame.cpp Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_frame.h Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_python.cpp Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_python.h Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_screen.cpp Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_screen.h Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_scriptengine.cpp Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_scriptengine.h Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_window.cpp Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_window.h Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_wndmgr.cpp Examining data/fqterm-0.9.10.1/src/fqterm/fqterm_wndmgr.h Examining data/fqterm-0.9.10.1/src/fqterm/main.cpp Examining data/fqterm-0.9.10.1/src/protocol/connect_info.h Examining data/fqterm-0.9.10.1/src/protocol/fqterm_local_socket.cpp Examining data/fqterm-0.9.10.1/src/protocol/fqterm_local_socket.h Examining data/fqterm-0.9.10.1/src/protocol/fqterm_socket.h Examining data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp Examining data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.cpp Examining data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.h Examining data/fqterm-0.9.10.1/src/protocol/fqterm_telnet_socket.cpp Examining data/fqterm-0.9.10.1/src/protocol/fqterm_telnet_socket.h Examining data/fqterm-0.9.10.1/src/protocol/internal/all_ciphers.c Examining data/fqterm-0.9.10.1/src/protocol/internal/buffer.c Examining data/fqterm-0.9.10.1/src/protocol/internal/buffer.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h Examining data/fqterm-0.9.10.1/src/protocol/internal/crc32.c Examining data/fqterm-0.9.10.1/src/protocol/internal/crc32.h Examining data/fqterm-0.9.10.1/src/protocol/internal/curve25519/base.c Examining data/fqterm-0.9.10.1/src/protocol/internal/curve25519/crypto_scalarmult.h Examining data/fqterm-0.9.10.1/src/protocol/internal/curve25519/smult.c Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh1_packet.cpp Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh1_packet.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_packet.cpp Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_packet.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_auth.cpp Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_auth.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_channel.cpp Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_channel.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_const.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_kex.cpp Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_kex.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_packet.cpp Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_packet.h Examining data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_types.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_3des-ssh1.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_cipher.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_crypto_common.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_crypto_common.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_diffie-hellman.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_diffie-hellman.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_endian.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_error.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_evp_cipher.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_mac.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_mac.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_pubkey_crypto.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_pubkey_crypto.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_rsa.c Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_rsa.h Examining data/fqterm-0.9.10.1/src/protocol/internal/ssh_session.h Examining data/fqterm-0.9.10.1/src/terminal/fqterm_buffer.cpp Examining data/fqterm-0.9.10.1/src/terminal/fqterm_buffer.h Examining data/fqterm-0.9.10.1/src/terminal/fqterm_session.cpp Examining data/fqterm-0.9.10.1/src/terminal/fqterm_session.h Examining data/fqterm-0.9.10.1/src/terminal/fqterm_text_line.cpp Examining data/fqterm-0.9.10.1/src/terminal/fqterm_text_line.h Examining data/fqterm-0.9.10.1/src/terminal/internal/fqterm_decode.cpp Examining data/fqterm-0.9.10.1/src/terminal/internal/fqterm_decode.h Examining data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.cpp Examining data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.h Examining data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp Examining data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.h Examining data/fqterm-0.9.10.1/src/ui/aboutdialog.cpp Examining data/fqterm-0.9.10.1/src/ui/aboutdialog.h Examining data/fqterm-0.9.10.1/src/ui/addrdialog.cpp Examining data/fqterm-0.9.10.1/src/ui/addrdialog.h Examining data/fqterm-0.9.10.1/src/ui/articledialog.cpp Examining data/fqterm-0.9.10.1/src/ui/articledialog.h Examining data/fqterm-0.9.10.1/src/ui/defineescape.cpp Examining data/fqterm-0.9.10.1/src/ui/defineescape.h Examining data/fqterm-0.9.10.1/src/ui/fqterm_time_label.cpp Examining data/fqterm-0.9.10.1/src/ui/fqterm_time_label.h Examining data/fqterm-0.9.10.1/src/ui/fqterm_tool_button.cpp Examining data/fqterm-0.9.10.1/src/ui/fqterm_tool_button.h Examining data/fqterm-0.9.10.1/src/ui/imageviewer/fqterm_canvas.cpp Examining data/fqterm-0.9.10.1/src/ui/imageviewer/fqterm_canvas.h Examining data/fqterm-0.9.10.1/src/ui/imageviewer/fqtermimage.cpp Examining data/fqterm-0.9.10.1/src/ui/imageviewer/fqtermimage.h Examining data/fqterm-0.9.10.1/src/ui/imageviewer/imageviewer.cpp Examining data/fqterm-0.9.10.1/src/ui/imageviewer/imageviewer.h Examining data/fqterm-0.9.10.1/src/ui/imageviewer/imageviewer_origin.cpp Examining data/fqterm-0.9.10.1/src/ui/imageviewer/imageviewer_origin.h Examining data/fqterm-0.9.10.1/src/ui/imageviewer/pictureflow.cpp Examining data/fqterm-0.9.10.1/src/ui/imageviewer/pictureflow.h Examining data/fqterm-0.9.10.1/src/ui/iplookup.cpp Examining data/fqterm-0.9.10.1/src/ui/iplookup.h Examining data/fqterm-0.9.10.1/src/ui/keydialog.cpp Examining data/fqterm-0.9.10.1/src/ui/keydialog.h Examining data/fqterm-0.9.10.1/src/ui/msgdialog.cpp Examining data/fqterm-0.9.10.1/src/ui/msgdialog.h Examining data/fqterm-0.9.10.1/src/ui/osdmessage.cpp Examining data/fqterm-0.9.10.1/src/ui/osdmessage.h Examining data/fqterm-0.9.10.1/src/ui/overlayWidget.cpp Examining data/fqterm-0.9.10.1/src/ui/overlayWidget.h Examining data/fqterm-0.9.10.1/src/ui/popupMessage.cpp Examining data/fqterm-0.9.10.1/src/ui/popupMessage.h Examining data/fqterm-0.9.10.1/src/ui/popwidget.cpp Examining data/fqterm-0.9.10.1/src/ui/popwidget.h Examining data/fqterm-0.9.10.1/src/ui/prefdialog.cpp Examining data/fqterm-0.9.10.1/src/ui/prefdialog.h Examining data/fqterm-0.9.10.1/src/ui/progressBar.cpp Examining data/fqterm-0.9.10.1/src/ui/progressBar.h Examining data/fqterm-0.9.10.1/src/ui/quickdialog.cpp Examining data/fqterm-0.9.10.1/src/ui/quickdialog.h Examining data/fqterm-0.9.10.1/src/ui/schemadialog.cpp Examining data/fqterm-0.9.10.1/src/ui/schemadialog.h Examining data/fqterm-0.9.10.1/src/ui/shortcutdialog.cpp Examining data/fqterm-0.9.10.1/src/ui/shortcutdialog.h Examining data/fqterm-0.9.10.1/src/ui/sitemanager.cpp Examining data/fqterm-0.9.10.1/src/ui/sitemanager.h Examining data/fqterm-0.9.10.1/src/ui/soundconf.cpp Examining data/fqterm-0.9.10.1/src/ui/soundconf.h Examining data/fqterm-0.9.10.1/src/ui/sshlogindialog.cpp Examining data/fqterm-0.9.10.1/src/ui/sshlogindialog.h Examining data/fqterm-0.9.10.1/src/ui/statusBar.cpp Examining data/fqterm-0.9.10.1/src/ui/statusBar.h Examining data/fqterm-0.9.10.1/src/ui/zmodemdialog.cpp Examining data/fqterm-0.9.10.1/src/ui/zmodemdialog.h Examining data/fqterm-0.9.10.1/src/utilities/fqterm_convert.cpp Examining data/fqterm-0.9.10.1/src/utilities/fqterm_convert.h Examining data/fqterm-0.9.10.1/src/utilities/fqterm_http.cpp Examining data/fqterm-0.9.10.1/src/utilities/fqterm_http.h Examining data/fqterm-0.9.10.1/src/utilities/fqterm_ip_location.cpp Examining data/fqterm-0.9.10.1/src/utilities/fqterm_ip_location.h Examining data/fqterm-0.9.10.1/src/utilities/fqwcwidth.cpp Examining data/fqterm-0.9.10.1/src/utilities/fqwcwidth.h FINAL RESULTS: data/fqterm-0.9.10.1/src/common/fqterm_font.cpp:254:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (QLocale::system().language() == QLocale::Chinese) { data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:216:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. strSection.sprintf("bbs %d", i); data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:232:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. strSection.sprintf("bbs %d", i); data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:242:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. strSection.sprintf("bbs %d", n); data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:420:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. strSection.sprintf("bbs %d", n); data/fqterm-0.9.10.1/src/fqterm/fqterm_frame.cpp:2049:21: [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. lang = QLocale::system().name(); data/fqterm-0.9.10.1/src/fqterm/fqterm_frame.cpp:2052:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (QLocale::system().language() == QLocale::English) data/fqterm-0.9.10.1/src/fqterm/fqterm_frame.cpp:2053:21: [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. lang = QLocale::system().name(); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:104:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(t1, "%s:%s", user, passwd); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:107:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(res, "%s: Basic %s\r\n", header, t2); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:289:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(request, "CONNECT %s:%u HTTP/1.0\r\n""%s\r\n", host.toLatin1().constData(), port, data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:474:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char*)command.data(), " %s %s", proxy_usr.toLocal8Bit().data(), data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_kex.cpp:31: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(V_C_, V_C); data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_kex.cpp:32: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(V_S_, V_S); data/fqterm-0.9.10.1/src/protocol/internal/ssh_cipher.h:30:11: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. crypt_t crypt; data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:168:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ssh_hosts_file, myhome); data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.c:59:11: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. cipher->crypt(cipher, buffer_data(data_to_send) + 4, data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.c:97:11: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. cipher->crypt(cipher, buffer_data(input), recv_ptr, total_len); data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.c:189:15: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if (cipher->crypt(cipher, data, data, len) != 1) data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.c:212:15: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if (cipher->crypt(cipher, input_data, input_data, data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.c:236:15: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if (cipher->crypt(cipher, tmp, tmp, left_len) != 1) data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:1056: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(xmDefPath, file); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:1058: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(xmFilename, file); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2568: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(rval, str); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:3045:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(zmodemlogfile, fmt, ap); data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:527:12: [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. if ((p = getenv("FQTERM_RESOURCE")) != NULL) data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:554:12: [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. if ((p = getenv("FQTERM_PREFIX")) != NULL) data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:571:21: [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. if ((evnDataDir = getenv("FQTERM_DATADIR")) != NULL) { data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:597:12: [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. if ((p = getenv("HOME")) != NULL) data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:166:17: [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. char *myhome = getenv("HOME"); data/fqterm-0.9.10.1/src/common/fqterm_config.cpp:41:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::WriteOnly)) { data/fqterm-0.9.10.1/src/common/fqterm_config.cpp:168:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:61:26: [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). return extractExifInfo(fopen(fileName.c_str(), "rb")); data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:279:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char CCName[7][10] = {"", "[Y]", "[Cb]", "[Cr]", "[Red]", "[Green]", "[Blue]"}; data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:407:7: [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(buffer, "%hu", shortValue); data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:416:7: [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(buffer, "%u", longValue); data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:435:7: [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(buffer, "%u/%u", urationalc / urationalgcd, urationalp / urationalgcd); data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:462:7: [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(buffer, "%d/%d", sign * rationalc / rationalgcd, rationalp / rationalgcd); data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:565: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 soi[2]; data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:571: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 app1[2]; data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:578: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 exifHeader[6]; data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.h:87:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char IFD0TagName[16][30]; data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.h:89:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char SubIFDTagName[38][30]; data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.h:90:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char exifHeaderStandard[6]; data/fqterm-0.9.10.1/src/common/fqterm_font.cpp:89:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly)) { data/fqterm-0.9.10.1/src/common/fqterm_path.cpp:585: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[MAX_PATH]; data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:179: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 buf[1024]; data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:205: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 buf[1024]; data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:256: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 buf[4096]; data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:266: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 outbuf[64 * 1024]; data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:480: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 ((audio_fd = open(FQ_AUDIO_DEV, O_WRONLY, 0)) == -1) { data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:488: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 (soundFile.open(QFile::ReadOnly)) { data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:497: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 sound_buf[1024]; data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:558:15: [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 ((fp = fopen(this->soundFile_.toLocal8Bit(), "r")) == NULL) { data/fqterm-0.9.10.1/src/fqterm/fqterm_frame.cpp:702: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 hex[4] = { tab[(b>>4)], tab[b&0xf], ':', 0 }; data/fqterm-0.9.10.1/src/fqterm/fqterm_frame.cpp:2093:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(QIODevice::ReadOnly); data/fqterm-0.9.10.1/src/fqterm/fqterm_python.cpp:303:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(QIODevice::ReadOnly); data/fqterm-0.9.10.1/src/fqterm/fqterm_screen.cpp:1438: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 tbl[256]; data/fqterm-0.9.10.1/src/fqterm/fqterm_scriptengine.cpp:102:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly)) { data/fqterm-0.9.10.1/src/fqterm/fqterm_scriptengine.cpp:272:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(QIODevice::WriteOnly); data/fqterm-0.9.10.1/src/fqterm/fqterm_scriptengine.cpp:279:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(QIODevice::ReadOnly); data/fqterm-0.9.10.1/src/fqterm/fqterm_scriptengine.cpp:287:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(QIODevice::WriteOnly | QIODevice::Append); data/fqterm-0.9.10.1/src/fqterm/fqterm_window.cpp:1387:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[2]={lp,NULL}; data/fqterm-0.9.10.1/src/fqterm/fqterm_window.cpp:2522:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(QIODevice::Truncate | QIODevice::WriteOnly); data/fqterm-0.9.10.1/src/fqterm/fqterm_window.cpp:2533:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(QIODevice::ReadOnly); data/fqterm-0.9.10.1/src/protocol/connect_info.h:13: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 hostname[256]; data/fqterm-0.9.10.1/src/protocol/connect_info.h:23: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 hash[32]; data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:48:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char tbl[64] = { data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:103: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 t1[len1+1], t2[len2+1]; data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:252: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(command.data() + 2, &addr_host.sin_port, 2); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:253: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(command.data() + 4, &addr_host.sin_addr, 4); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:429: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(&addr_host.sin_addr, hostent->h_addr, 4); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:461: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(command.data() + 4, &addr_host.sin_addr, 4); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:462: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(command.data() + 8, &addr_host.sin_port, 2); data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.cpp:179:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hash[32]; data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.cpp:180: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 hash_b64[64]; data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.cpp:188: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 d[4]; data/fqterm-0.9.10.1/src/protocol/internal/buffer.c:55:4: [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(b->p + b->offs + b->sz, s, len); data/fqterm-0.9.10.1/src/protocol/internal/buffer.c:68: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(b->p + b->offs + b->sz + 4, s, len); data/fqterm-0.9.10.1/src/protocol/internal/buffer.c:113:2: [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, buffer_data(b), len); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:47:50: [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. void base64_init_maps(base64_maps_t *dest, const char src[64]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:51:2: [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->encode_map,src,64); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:64: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. char dest[4], const char src[3]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:64:31: [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 dest[4], const char src[3]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:76:63: [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. void base64_encode_tail_using_maps(const base64_maps_t *maps, char dest[4], data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:79: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 longsrc[3] = { 0 }; data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:83:2: [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(longsrc, src, srclen); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:121:65: [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. int base64_decode_quartet_using_maps(const base64_maps_t *maps, char dest[3], data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:122:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char src[4]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:146:62: [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. int base64_decode_tail_using_maps(const base64_maps_t *maps, char dest[3], data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:149: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 longsrc[4]; data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.c:165:2: [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(longsrc, src, insize); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:17: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 encode_map[64]; data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:18: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. signed char decode_map[256]; data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:42:50: [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. void base64_init_maps(base64_maps_t *dest, const char src[64]); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:52: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. char dest[4], const char src[3]); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:52:31: [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 dest[4], const char src[3]); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:61:63: [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. void base64_encode_tail_using_maps(const base64_maps_t *maps, char dest[4], data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:111:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dest[3], const char src[4]); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:111:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dest[3], const char src[4]); data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:164:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. void base64_encode_triplet(char dest[4], const char src[3]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:164:48: [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. void base64_encode_triplet(char dest[4], const char src[3]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:176:25: [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. void base64_encode_tail(char dest[4], const char *src, size_t srclen) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:219:27: [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. int base64_decode_quartet(char dest[3], const char src[4]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:219:47: [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. int base64_decode_quartet(char dest[3], const char src[4]) data/fqterm-0.9.10.1/src/protocol/internal/ccan_base64.h:235:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ssize_t base64_decode_tail(char dest[3], const char *src, size_t srclen) data/fqterm-0.9.10.1/src/protocol/internal/curve25519/base.c:10:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char base[32] = {9}; data/fqterm-0.9.10.1/src/protocol/internal/curve25519/smult.c:123:59: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static void mainloop(unsigned int work[64],const unsigned char e[32]) data/fqterm-0.9.10.1/src/protocol/internal/curve25519/smult.c:252: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 e[32]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:131: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(sess.I_S + 1, buffer_data(&packet_receiver_->recvbuf), sess.I_S_len - 1); data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:138: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 kex_algos[kl_len+1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:150: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 hk_algo[hk_algo_len+1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:156: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 el_c2s[el_c2s_len+1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:168: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 el_s2c[el_s2c_len+1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:180: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 m_c2s[m_c2s_len+1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:192: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 m_s2c[m_s2c_len+1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:241: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(sess.I_C, buffer_data(&packet_sender_->orig_data), sess.I_C_len); data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:302: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. unsigned char IV_c2s[128], IV_s2c[128], key_c2s[128], key_s2c[128], mac_c2s[128], mac_s2c[128]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh2_kex.cpp:311:4: [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(sess.session_id, sess.H, sess.dh->digest.hashlen); data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_packet.cpp:114: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(mac->key, key, mac->keySize); data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_packet.cpp:229: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(mac->key, key, mac->keySize); data/fqterm-0.9.10.1/src/protocol/internal/ssh_crypto_common.c:21:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *start[ns], *end[ns]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_diffie-hellman.c:262: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. unsigned char s[32]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_diffie-hellman.h:40:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char privkey[32]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:27:2: [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, buf, l); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:35: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 linebuf[1536]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:39:7: [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(fn, "r"); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:96: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). if (hn_end == NULL || atoi(hn_end + 1) != port) data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:116: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 buf[1536]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:134:13: [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 *fp = fopen(fn, "a"); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:138: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 algo[32]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:139: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 buf[1536]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:145:2: [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(algo, K_S + 4, algo_len); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:169:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ssh_hosts_file, "/.ssh/known_hosts"); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.h:16: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 hostname[256], keytype[32], pubkey[1024]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_mac.h:45: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 key[32]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_packet.c:99: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(recv_ptr, buffer_data(input), total_len); data/fqterm-0.9.10.1/src/protocol/internal/ssh_pubkey_crypto.c:35: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. unsigned char outbuf[olen], inbuf[ilen]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_rsa.c:81:2: [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(ss->K_S, K_S, K_S_len); data/fqterm-0.9.10.1/src/protocol/internal/ssh_rsa.c:111: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. unsigned char s_H[SHA_DIGEST_LENGTH]; data/fqterm-0.9.10.1/src/protocol/internal/ssh_session.h:14: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. unsigned char H[SHA512_DIGEST_LENGTH]; data/fqterm-0.9.10.1/src/terminal/fqterm_session.cpp:1527: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 (f.open(QIODevice::WriteOnly)) { data/fqterm-0.9.10.1/src/terminal/fqterm_text_line.cpp:196: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. typedef char Verify_QChar_Is_Two_Bytes[ data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.cpp:544: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, from_socket.data(), raw_size); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.cpp:566: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, to_ansi.data(), rsize); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.cpp:588: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(from_ansi.data(), data, len); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:590:19: [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). zmodemlogfile = fopen("zmodem.log", "w+"); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:698:37: [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 (file == NULL || (info->file = fopen(file, "rb")) == NULL) { data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:1079:17: [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 *ifile = fopen(name, "rb"); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:1211:12: [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). rval = fopen(str.toLocal8Bit(), apnd ? "ab" : "wb"); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2662: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(ptr, info->rfilename, i + 1); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2664:3: [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((char*)ptr, "%d %lo %o 0", info->len, info->date, info->mode); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2734: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(ptr, info->rfilename, i + 1); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2736:3: [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((char*)ptr, "%d %lo %o 0 %d %d 0", info->len, info->date, info->mode, data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:3030:19: [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). zmodemlogfile = fopen("zmodem.log", "a"); data/fqterm-0.9.10.1/src/ui/aboutdialog.cpp:45:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QIODevice::ReadOnly)) { data/fqterm-0.9.10.1/src/ui/articledialog.cpp:88: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/fqterm-0.9.10.1/src/ui/imageviewer/fqterm_canvas.cpp:322:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QIODevice::ReadOnly)) { data/fqterm-0.9.10.1/src/ui/imageviewer/fqterm_canvas.cpp:324: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 (save.open(QIODevice::WriteOnly)) { data/fqterm-0.9.10.1/src/ui/imageviewer/fqterm_canvas.cpp:353:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (file.open(QIODevice::ReadOnly)) { data/fqterm-0.9.10.1/src/ui/imageviewer/fqterm_canvas.cpp:355: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 (save.open(QIODevice::WriteOnly)) { data/fqterm-0.9.10.1/src/ui/imageviewer/pictureflow.cpp:235:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE*f = fopen("table.c","wt"); data/fqterm-0.9.10.1/src/utilities/fqterm_http.cpp:212: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::ReadWrite | QIODevice::Append)) { data/fqterm-0.9.10.1/src/utilities/fqterm_ip_location.cpp:54:30: [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 ((ipDatabase_->ipfp = fopen((pathLib + (files.at(0))).toLocal8Bit(), "rb")) == NULL) { data/fqterm-0.9.10.1/src/utilities/fqterm_ip_location.cpp:99: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 str[512]; data/fqterm-0.9.10.1/src/utilities/fqterm_ip_location.cpp:122: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 buf[3] = {0}; data/fqterm-0.9.10.1/src/utilities/fqterm_ip_location.cpp:162: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 buf[7] = {0}; data/fqterm-0.9.10.1/src/utilities/fqterm_ip_location.cpp:197: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 buf[4] = {0}; data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:363:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&shortValue, 2,1) || shortValue == 0 || shortValue > MAXGUARD) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:368:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&count, 4,1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:377:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(buffer, 1, count)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:381:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&offset, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:386:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(buffer, 1, count); data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:392:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&offset, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:398:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(buffer, 1, count); data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:403:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&shortValue, 2, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:412:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&longValue, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:422:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&offset, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:426:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&urationalc, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:429:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&urationalp, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:440:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&offset, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:445:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&rationalc, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:452:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&rationalp, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:475:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&tag, 2, 1)) data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:501:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&tag, 2, 1)) data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:526:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&ifdOffset_, 4, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:531:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&entryCount, 2, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:552:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&entryCount, 2, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:566:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(soi, 2, 1)) data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:572:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(app1, 2, 1)) data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:579:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(exifHeader, 1, 6)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:593:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(&endian, 2, 1)) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.cpp:631:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool ExifExtractor::read( void* buffer, size_t elementSize, size_t count ) { data/fqterm-0.9.10.1/src/common/fqterm_exif_extractor.h:66:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(void* buffer, size_t elementSize, size_t count); data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:190:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((l = read(soundfd, buf, l)) <= 0) { data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:223:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((l = read(soundfd, buf, l)) <= 0) { data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:330:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(soundfd, buf, nBlockAlign) == nBlockAlign) { data/fqterm-0.9.10.1/src/common/fqterm_sound.cpp:499:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((l = read(sound_fd, sound_buf, sizeof(sound_buf))) == -1) { data/fqterm-0.9.10.1/src/fqterm/fqterm_python.cpp:406: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(pstr); data/fqterm-0.9.10.1/src/protocol/fqterm_local_socket.cpp:44:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return shell_process_->read(maxlen); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:100:13: [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 len1 = strlen(user) + 1 +strlen(passwd); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:100: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). int len1 = strlen(user) + 1 +strlen(passwd); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:106: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). res = (char*)malloc(len2 + 11 + strlen(header)); data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:285: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). len = proxyauth != NULL ? strlen(proxyauth): 0; data/fqterm-0.9.10.1/src/protocol/fqterm_socket_private.cpp:440:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return m_socket->read(maxlen); data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.cpp:265: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). socketWriteBlock(V1STR, strlen(V1STR)); data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.cpp:269: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). socketWriteBlock(V2STR, strlen(V2STR)); data/fqterm-0.9.10.1/src/protocol/fqterm_ssh_socket.cpp:310:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(conn_info.hostname, host_name.toLatin1().constData(), data/fqterm-0.9.10.1/src/protocol/fqterm_telnet_socket.cpp:39:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(conn_info.hostname, host.toLatin1().constData(), data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_kex.cpp:28:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). V_C_ = new char[strlen(V_C) + 1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_kex.cpp:29:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). V_S_ = new char[strlen(V_S) + 1]; data/fqterm-0.9.10.1/src/protocol/internal/fqterm_ssh_packet.cpp:63: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(s); data/fqterm-0.9.10.1/src/protocol/internal/ssh_crypto_common.c:29: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). end[ns-1] = start[ns-1]+strlen(start[ns-1]); data/fqterm-0.9.10.1/src/protocol/internal/ssh_crypto_common.c:32:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(l[i].name); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:77: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). int L = strlen(hostname); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:91: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). hlen = strlen(hn); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:115: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). int h_keylen = strlen(h->pubkey); data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:118:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(h->keytype) == algo_len && data/fqterm-0.9.10.1/src/protocol/internal/ssh_known_hosts.c:167: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). ssh_hosts_file = malloc(strlen(myhome) + 20); data/fqterm-0.9.10.1/src/protocol/internal/ssh_rsa.c:96:39: [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_append_string(&vbuf, ss->V_C, strlen(ss->V_C)); data/fqterm-0.9.10.1/src/protocol/internal/ssh_rsa.c:97:39: [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_append_string(&vbuf, ss->V_S, strlen(ss->V_S)); data/fqterm-0.9.10.1/src/terminal/fqterm_session.cpp:999:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). telnet_->read(&telnet_data_[0] + last_size, size); data/fqterm-0.9.10.1/src/terminal/fqterm_session.cpp:1378:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return write(str, strlen(str)); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.cpp:198:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(term,strTermType.toLatin1(),20); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.cpp:553:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int FQTermTelnet::read(char *data, uint maxlen) { data/fqterm-0.9.10.1/src/terminal/internal/fqterm_telnet.h:76:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read(char *data, uint maxlen); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:1089:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i = fgetc(ifile)) != EOF) { data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2188:28: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (len > 0 && (c = getc(info->file)) != EOF) { data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2449:20: [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). ptr = fileinfo + strlen(fileinfo) + 1; data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2566:13: [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 len = strlen(str) + 1; data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2661: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). i = strlen(info->rfilename); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2665: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). ptr += strlen((char*)ptr); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2733: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). i = strlen(info->rfilename); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2738: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). ptr += strlen((char*)ptr); data/fqterm-0.9.10.1/src/terminal/internal/fqterm_zmodem.cpp:2864: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). strlen(at) + 1, ZCRCW, (uchar*)at, info))) { ANALYSIS SUMMARY: Hits = 235 Lines analyzed = 65257 in approximately 3.09 seconds (21092 lines/second) Physical Source Lines of Code (SLOC) = 51576 Hits@level = [0] 27 [1] 67 [2] 138 [3] 5 [4] 25 [5] 0 Hits@level+ = [0+] 262 [1+] 235 [2+] 168 [3+] 30 [4+] 25 [5+] 0 Hits/KSLOC@level+ = [0+] 5.07988 [1+] 4.55638 [2+] 3.25733 [3+] 0.581666 [4+] 0.484722 [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.