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/minicom-2.7.2~20200725/extras/dialdir-32b-to-64b-up-to-v5.c Examining data/minicom-2.7.2~20200725/lib/error.c Examining data/minicom-2.7.2~20200725/lib/error.h Examining data/minicom-2.7.2~20200725/lib/getopt.c Examining data/minicom-2.7.2~20200725/lib/getopt.h Examining data/minicom-2.7.2~20200725/lib/getopt_long.c Examining data/minicom-2.7.2~20200725/lib/libport.h Examining data/minicom-2.7.2~20200725/lib/snprintf.c Examining data/minicom-2.7.2~20200725/lib/usleep.c Examining data/minicom-2.7.2~20200725/po/ujis2sjis.c Examining data/minicom-2.7.2~20200725/src/ascii-xfr.c Examining data/minicom-2.7.2~20200725/src/common.c Examining data/minicom-2.7.2~20200725/src/config.c Examining data/minicom-2.7.2~20200725/src/configsym.h Examining data/minicom-2.7.2~20200725/src/defmap.h Examining data/minicom-2.7.2~20200725/src/dial.c Examining data/minicom-2.7.2~20200725/src/file.c Examining data/minicom-2.7.2~20200725/src/functions.c Examining data/minicom-2.7.2~20200725/src/getsdir.c Examining data/minicom-2.7.2~20200725/src/getsdir.h Examining data/minicom-2.7.2~20200725/src/help.c Examining data/minicom-2.7.2~20200725/src/intl.h Examining data/minicom-2.7.2~20200725/src/ipc.c Examining data/minicom-2.7.2~20200725/src/keyboard.h Examining data/minicom-2.7.2~20200725/src/keyserv.c Examining data/minicom-2.7.2~20200725/src/main.c Examining data/minicom-2.7.2~20200725/src/minicom.c Examining data/minicom-2.7.2~20200725/src/minicom.h Examining data/minicom-2.7.2~20200725/src/port.h Examining data/minicom-2.7.2~20200725/src/rwconf.c Examining data/minicom-2.7.2~20200725/src/script.c Examining data/minicom-2.7.2~20200725/src/sysdep.h Examining data/minicom-2.7.2~20200725/src/sysdep1.c Examining data/minicom-2.7.2~20200725/src/sysdep1_s.c Examining data/minicom-2.7.2~20200725/src/sysdep2.c Examining data/minicom-2.7.2~20200725/src/util.c Examining data/minicom-2.7.2~20200725/src/vt100.c Examining data/minicom-2.7.2~20200725/src/vt100.h Examining data/minicom-2.7.2~20200725/src/wildmat.c Examining data/minicom-2.7.2~20200725/src/windiv.c Examining data/minicom-2.7.2~20200725/src/window.c Examining data/minicom-2.7.2~20200725/src/window.h Examining data/minicom-2.7.2~20200725/src/wkeys.c Examining data/minicom-2.7.2~20200725/src/updown.c FINAL RESULTS: data/minicom-2.7.2~20200725/src/config.c:1384:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(fname, (mode_t) 0644); data/minicom-2.7.2~20200725/lib/error.c:147: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 (stderr, message, args); data/minicom-2.7.2~20200725/lib/error.c:153: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, message, a1, a2, a3, a4, a5, a6, a7, a8); data/minicom-2.7.2~20200725/lib/error.c:222: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 (stderr, message, args); data/minicom-2.7.2~20200725/lib/error.c:228: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, message, a1, a2, a3, a4, a5, a6, a7, a8); data/minicom-2.7.2~20200725/lib/error.h:36:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define __printf__ printf data/minicom-2.7.2~20200725/lib/libport.h:10:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. extern int snprintf (char *str, size_t count, const char *fmt, ...); data/minicom-2.7.2~20200725/lib/libport.h:14:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); data/minicom-2.7.2~20200725/lib/snprintf.c:172:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. SCOPE int vsnprintf(char *str, size_t size, const char *fmt, va_list ap); data/minicom-2.7.2~20200725/lib/snprintf.c:183:1: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(char *str, size_t size, const char *fmt, ...) data/minicom-2.7.2~20200725/lib/snprintf.c:189:10: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. cc = vsnprintf(str, size, fmt, ap); data/minicom-2.7.2~20200725/lib/snprintf.c:217:16: [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). *len = strlen(strcpy(buf, p)); data/minicom-2.7.2~20200725/lib/snprintf.c:366:1: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(char *str, size_t size, const char *fmt, va_list ap) data/minicom-2.7.2~20200725/src/common.c:78: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(logfile, line, ap); data/minicom-2.7.2~20200725/src/config.c:92: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(P_PNAME(f), buf); data/minicom-2.7.2~20200725/src/config.c:143:9: [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 (access(s, W_OK) == 0) data/minicom-2.7.2~20200725/src/config.c:153:7: [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 (access(buf, W_OK) == 0) data/minicom-2.7.2~20200725/src/config.c:222: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(s, w); data/minicom-2.7.2~20200725/src/config.c:270:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(logfname,P_LOGFNAME); data/minicom-2.7.2~20200725/src/config.c:273:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_LOGCONN, yesno(P_LOGCONN[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:279:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_LOGXFER, yesno(P_LOGXFER[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:508: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(P_FSELW, yesno(P_FSELW[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:520: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(P_ASKDNDIR, yesno(P_ASKDNDIR[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:613:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_HASRTS, yesno(P_HASRTS[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:621:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_HASXON, yesno(P_HASXON[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:629:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_RS485_EN, yesno(P_RS485_EN[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:637:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_RS485_RTS_ON_SEND, yesno(P_RS485_RTS_ON_SEND[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:645:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_RS485_RTS_AFTER_SEND, yesno(P_RS485_RTS_AFTER_SEND[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:653:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_RS485_RX_DURING_TX, yesno(P_RS485_RX_DURING_TX[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:661:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_RS485_TERMINATE_BUS, yesno(P_RS485_TERMINATE_BUS[0] == 'N')); data/minicom-2.7.2~20200725/src/config.c:1041:11: [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(buf, N_("Meta-8th bit ")); data/minicom-2.7.2~20200725/src/config.c:1043:11: [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(buf, N_("Escape (Meta)")); data/minicom-2.7.2~20200725/src/config.c:1881:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf,P_CONVF); data/minicom-2.7.2~20200725/src/config.c:1890:11: [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(P_CONVF,buf); data/minicom-2.7.2~20200725/src/config.c:1893:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf,P_CONVF); data/minicom-2.7.2~20200725/src/config.c:1902:11: [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(P_CONVF,buf); data/minicom-2.7.2~20200725/src/config.c:1956:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_CONVCAP, yesno(P_CONVCAP[0] == 'N')); data/minicom-2.7.2~20200725/src/dial.c:590:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(P_CONVF, d->convfile); data/minicom-2.7.2~20200725/src/dial.c:1042:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(copycmd) == 0) { data/minicom-2.7.2~20200725/src/dial.c:1461: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(P_BAUDRATE, d->baud); data/minicom-2.7.2~20200725/src/dial.c:1462: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(P_PARITY, d->parity); data/minicom-2.7.2~20200725/src/dial.c:1463: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(P_BITS, d->bits); data/minicom-2.7.2~20200725/src/dial.c:1464: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(P_STOPB, d->stopb); data/minicom-2.7.2~20200725/src/dial.c:1476: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(P_BACKSPACE, d->flags & FL_DEL ? "DEL" : "BS"); data/minicom-2.7.2~20200725/src/file.c:314:8: [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 (!access(work_dir, R_OK | X_OK) && !chdir(work_dir)) { data/minicom-2.7.2~20200725/src/file.c:381:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(cwd_str, sizeof(cwd_str), cwd_str_fmt, disp_dir); data/minicom-2.7.2~20200725/src/file.c:383:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(cwd_str, sizeof(cwd_str), cwd_str_fmt, work_dir); data/minicom-2.7.2~20200725/src/file.c:466:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(work_dir, new_dir); data/minicom-2.7.2~20200725/src/file.c:790:11: [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(wc_str, wc_mem); data/minicom-2.7.2~20200725/src/file.c:848:31: [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. int f_exist = access(ret_buf, F_OK); data/minicom-2.7.2~20200725/src/main.c:293:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(lockfile, "%s/LK.%03d.%03d.%03d", data/minicom-2.7.2~20200725/src/main.c:636:23: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. bufi += snprintf(buf + bufi, COLS - bufi, cursormode == NORMAL ? "NOR" : "APP"); data/minicom-2.7.2~20200725/src/main.c:686: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(current_status_line, buf); data/minicom-2.7.2~20200725/src/minicom.c:162:5: [4] (shell) execl: 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. execl(sh, sh, NULL); data/minicom-2.7.2~20200725/src/minicom.c:1059: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(stderr, fmt, va); data/minicom-2.7.2~20200725/src/minicom.c:1447: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(logfname,P_LOGFNAME); data/minicom-2.7.2~20200725/src/rwconf.c:377:11: [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(m->value, s); data/minicom-2.7.2~20200725/src/script.c:315: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(t, s); data/minicom-2.7.2~20200725/src/script.c:639: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. int status = system(text); data/minicom-2.7.2~20200725/src/script.c:654:14: [4] (shell) popen: 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. FILE *fp = popen(text, "r"); data/minicom-2.7.2~20200725/src/updown.c:150:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ptr, dial_tty); data/minicom-2.7.2~20200725/src/updown.c:155:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ptr, P_BAUDRATE); data/minicom-2.7.2~20200725/src/updown.c:161:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ptr, str_portfd); data/minicom-2.7.2~20200725/src/updown.c:441:25: [4] (format) wprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (P_SOUND[0] == 'Y') wprintf(win, "\007\007\007"); data/minicom-2.7.2~20200725/src/updown.c:600:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "%s=%s", name, value); data/minicom-2.7.2~20200725/src/util.c:113:12: [4] (shell) execl: 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. return execl("/bin/sh", "sh", "-c", cmd, NULL); data/minicom-2.7.2~20200725/src/util.c:124:10: [4] (shell) execvp: 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. return execvp(words[0], words); data/minicom-2.7.2~20200725/src/windiv.c:49:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), fmt, va); data/minicom-2.7.2~20200725/src/window.c:134:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(lala, sizeof(lala), s, ap); data/minicom-2.7.2~20200725/src/window.c:1116:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), fmt, va); data/minicom-2.7.2~20200725/src/window.c:1811:5: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(s, buf); data/minicom-2.7.2~20200725/src/window.h:159:31: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))); data/minicom-2.7.2~20200725/lib/getopt.c:213:7: [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 *getenv (); data/minicom-2.7.2~20200725/lib/getopt.c:365: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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/minicom-2.7.2~20200725/lib/getopt.c:394:25: [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. nonoption_flags = getenv (var); data/minicom-2.7.2~20200725/lib/getopt.c:917:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (argc, argv, optstring) data/minicom-2.7.2~20200725/lib/getopt.c:947:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "abc:d:0123456789"); data/minicom-2.7.2~20200725/lib/getopt.h:106:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int argc, char *const *argv, const char *shortopts); data/minicom-2.7.2~20200725/lib/getopt.h:110:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int argc, char *const *argv, const char *shortopts, data/minicom-2.7.2~20200725/lib/getopt.h:122:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/minicom-2.7.2~20200725/lib/getopt.h:123:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (); data/minicom-2.7.2~20200725/lib/getopt_long.c:68:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (argc, argv, options, long_options, opt_index) data/minicom-2.7.2~20200725/lib/getopt_long.c:124:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, "abc:d:0123456789", data/minicom-2.7.2~20200725/src/ascii-xfr.c:259:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "srdevnl:c:")) != EOF) { data/minicom-2.7.2~20200725/src/config.c:189:15: [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. (home = getenv("HOME")) && strlen(s) + strlen(home) <= maxl) { data/minicom-2.7.2~20200725/src/dial.c:335:15: [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 (strncmp(getenv("TERM"), "xterm", 5) == 0 && data/minicom-2.7.2~20200725/src/dial.c:336:15: [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. (disp = getenv("DISPLAY")) != NULL && data/minicom-2.7.2~20200725/src/minicom.c:145:8: [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. sh = getenv("SHELL"); data/minicom-2.7.2~20200725/src/minicom.c:815:14: [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 *mc = getenv("MINICOM"); data/minicom-2.7.2~20200725/src/minicom.c:941:9: [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. tmp = getenv("LC_CTYPE"); data/minicom-2.7.2~20200725/src/minicom.c:943:11: [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. tmp = getenv("LC_ALL"); data/minicom-2.7.2~20200725/src/minicom.c:945:11: [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. tmp = getenv("LANG"); data/minicom-2.7.2~20200725/src/minicom.c:1177: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. strncpy(termtype, getenv("TERM") ? getenv("TERM") : "dumb", sizeof(termtype)); data/minicom-2.7.2~20200725/src/minicom.c:1177:38: [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. strncpy(termtype, getenv("TERM") ? getenv("TERM") : "dumb", sizeof(termtype)); data/minicom-2.7.2~20200725/src/minicom.c:1206:16: [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 *e1 = getenv("LANG"), *e2 = getenv("LC_ALL"); data/minicom-2.7.2~20200725/src/minicom.c:1206:38: [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 *e1 = getenv("LANG"), *e2 = getenv("LC_ALL"); data/minicom-2.7.2~20200725/src/minicom.c:1221:13: [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 ((mc = getenv("MINICOM")) != NULL) { data/minicom-2.7.2~20200725/src/minicom.c:1246:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argk, args, "v78zhlLsomMHb:wTc:a:t:d:p:C:S:D:R:F:O:", data/minicom-2.7.2~20200725/src/minicom.c:1303:20: [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 ((s = getenv("TERMCAP")) != NULL && *s != '/') data/minicom-2.7.2~20200725/src/minicom.c:1434: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 ((s = getenv("HOME")) == NULL) data/minicom-2.7.2~20200725/src/port.h:32:10: [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 *getenv(void); data/minicom-2.7.2~20200725/src/script.c:127:10: [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. return getenv(env); data/minicom-2.7.2~20200725/src/script.c:1114:19: [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. else if ((s = getenv("HOME")) != NULL) data/minicom-2.7.2~20200725/src/sysdep2.c:62:26: [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 (*rows == 0 && (p = getenv("LINES")) != NULL) data/minicom-2.7.2~20200725/src/sysdep2.c:64:26: [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 (*cols == 0 && (p = getenv("COLUMNS")) != NULL) data/minicom-2.7.2~20200725/src/window.c:1887:15: [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 ((term = getenv("TERM")) == NULL) { data/minicom-2.7.2~20200725/src/wkeys.c:132: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. term = getenv("TERM"); data/minicom-2.7.2~20200725/extras/dialdir-32b-to-64b-up-to-v5.c:45: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 data[65535], dialdir_bak_name[MAXPATHLEN], data/minicom-2.7.2~20200725/extras/dialdir-32b-to-64b-up-to-v5.c:62: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). fd = open(argv[1], O_RDONLY); data/minicom-2.7.2~20200725/extras/dialdir-32b-to-64b-up-to-v5.c:121: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). fd = open(argv[1], O_CREAT | O_EXCL | O_WRONLY, S_IRUSR | S_IWUSR); data/minicom-2.7.2~20200725/lib/error.c:160:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[1024]; data/minicom-2.7.2~20200725/lib/error.c:235:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[1024]; data/minicom-2.7.2~20200725/lib/getopt.c:392:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char var[100]; data/minicom-2.7.2~20200725/lib/getopt.c:393: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 (var, "_%d_GNU_nonoption_argv_flags_", getpid ()); data/minicom-2.7.2~20200725/lib/snprintf.c:248: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 temp[EXPONENT_LENGTH]; /* for exponent conversion */ data/minicom-2.7.2~20200725/lib/snprintf.c:389: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 num_buf[NUM_BUF_SIZE]; data/minicom-2.7.2~20200725/lib/snprintf.c:390: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 char_buf[2]; /* for printing %% and %<unknown> */ data/minicom-2.7.2~20200725/po/ujis2sjis.c:49: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 buf[256]; data/minicom-2.7.2~20200725/src/ascii-xfr.c:121: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 line[1024]; data/minicom-2.7.2~20200725/src/ascii-xfr.c:154: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 line[1024]; data/minicom-2.7.2~20200725/src/ascii-xfr.c:159: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). if ((fp = fopen(file, "r")) == NULL) { data/minicom-2.7.2~20200725/src/ascii-xfr.c:209: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 line[1024]; data/minicom-2.7.2~20200725/src/ascii-xfr.c:214: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). if ((fp = fopen(file, "w")) == NULL) { data/minicom-2.7.2~20200725/src/ascii-xfr.c:278: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). ldelay = atoi(optarg); data/minicom-2.7.2~20200725/src/ascii-xfr.c:281: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). cdelay = atoi(optarg); data/minicom-2.7.2~20200725/src/common.c:43: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. static char buf[FILENAME_MAX]; data/minicom-2.7.2~20200725/src/common.c:45: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. static char buf[256]; data/minicom-2.7.2~20200725/src/common.c:67: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). logfile = fopen(logname,"a"); data/minicom-2.7.2~20200725/src/config.c:50: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[64]; data/minicom-2.7.2~20200725/src/config.c:54: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). if ((fp = fopen(parfile, "r"))) { data/minicom-2.7.2~20200725/src/config.c:60: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). if ((fp = fopen(pparfile, "r")) != NULL) { data/minicom-2.7.2~20200725/src/config.c:72: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(pfix_home(P_MACROS), "r")) == NULL) { data/minicom-2.7.2~20200725/src/config.c:136: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[128]; data/minicom-2.7.2~20200725/src/config.c:192: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(s, home, strlen(home)); data/minicom-2.7.2~20200725/src/config.c:510:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_ASKDNDIR, "No "); data/minicom-2.7.2~20200725/src/config.c:522:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_FSELW, "Yes"); data/minicom-2.7.2~20200725/src/config.c:910: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[16]; data/minicom-2.7.2~20200725/src/config.c:1010:13: [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 (atoi(P_HISTSIZE) != num_hist_lines) { data/minicom-2.7.2~20200725/src/config.c:1045:11: [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(buf, "^%c ", (c & 0x1f) + 'A' - 1); data/minicom-2.7.2~20200725/src/config.c:1178:13: [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 (atoi(P_HISTSIZE) <= 0) data/minicom-2.7.2~20200725/src/config.c:1180: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). else if (atoi(P_HISTSIZE) >= 5000) data/minicom-2.7.2~20200725/src/config.c:1181:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_HISTSIZE,"5000"); data/minicom-2.7.2~20200725/src/config.c:1190:14: [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(pfix_home(P_MACROS), "r+"); data/minicom-2.7.2~20200725/src/config.c:1264: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[8]; data/minicom-2.7.2~20200725/src/config.c:1336:9: [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(buf, "%d", vt_nl_delay); data/minicom-2.7.2~20200725/src/config.c:1339: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). vt_nl_delay = atoi(buf); data/minicom-2.7.2~20200725/src/config.c:1347:9: [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(buf, "%d", vt_ch_delay); data/minicom-2.7.2~20200725/src/config.c:1350: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). vt_ch_delay = atoi(buf); data/minicom-2.7.2~20200725/src/config.c:1377: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). if ((fp = fopen(fname, "w")) == NULL) { data/minicom-2.7.2~20200725/src/config.c:1403: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). if ((fp = fopen(pfix_home(P_MACROS), "w")) == (FILE *)NULL) { data/minicom-2.7.2~20200725/src/config.c:1411:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"SAVED"); /* fmg - reset after save */ data/minicom-2.7.2~20200725/src/config.c:1423: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 ifile[128]; data/minicom-2.7.2~20200725/src/config.c:1450:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char save_setup_as_menu[64]; data/minicom-2.7.2~20200725/src/config.c:1580: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 tmps[15]; data/minicom-2.7.2~20200725/src/config.c:1671:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(ba, "%d", speeds[speed_idx]); /* XXX: uff, how long is 'ba' ? */ data/minicom-2.7.2~20200725/src/config.c:1737:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,_("CHANGED")); /* fmg - ...I'm ashamed */ data/minicom-2.7.2~20200725/src/config.c:1743:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... really, I am */ data/minicom-2.7.2~20200725/src/config.c:1749:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... this is the */ data/minicom-2.7.2~20200725/src/config.c:1755:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... first entry on */ data/minicom-2.7.2~20200725/src/config.c:1761:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... my TODO list. */ data/minicom-2.7.2~20200725/src/config.c:1767:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... and, come to think */ data/minicom-2.7.2~20200725/src/config.c:1773:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... of it, I no longer */ data/minicom-2.7.2~20200725/src/config.c:1779:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... even use this... */ data/minicom-2.7.2~20200725/src/config.c:1785:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... [sigh] */ data/minicom-2.7.2~20200725/src/config.c:1791:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... [sigh] */ data/minicom-2.7.2~20200725/src/config.c:1797:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); /* fmg - ... [sigh] */ data/minicom-2.7.2~20200725/src/config.c:1803:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_MACCHG,"CHANGED"); data/minicom-2.7.2~20200725/src/config.c:1831: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[64]; data/minicom-2.7.2~20200725/src/config.c:1917:9: [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(buf, "%u",(unsigned int) vt_inmap[i]); data/minicom-2.7.2~20200725/src/config.c:1929:9: [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(buf, "%u",(unsigned int) vt_outmap[i]); data/minicom-2.7.2~20200725/src/config.c:1969: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). if ((fp = fopen(pfix_home(buf), "rb")) == (FILE *)NULL) { data/minicom-2.7.2~20200725/src/config.c:1988: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). if ((fp = fopen(pfix_home(buf), "wb")) == (FILE *)NULL) { data/minicom-2.7.2~20200725/src/configsym.h:43: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 value[PARS_VAL_LEN]; data/minicom-2.7.2~20200725/src/configsym.h:56: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 value[MAC_LEN]; data/minicom-2.7.2~20200725/src/dial.c:53: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 name[32]; data/minicom-2.7.2~20200725/src/dial.c:54: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 number[16]; data/minicom-2.7.2~20200725/src/dial.c:55: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 script[16]; data/minicom-2.7.2~20200725/src/dial.c:56: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 username[32]; data/minicom-2.7.2~20200725/src/dial.c:57: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 password[32]; data/minicom-2.7.2~20200725/src/dial.c:59: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 baud[8]; data/minicom-2.7.2~20200725/src/dial.c:60: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 parity[2]; data/minicom-2.7.2~20200725/src/dial.c:63: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 bits[2]; data/minicom-2.7.2~20200725/src/dial.c:68: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 name[32]; data/minicom-2.7.2~20200725/src/dial.c:69: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 number[32]; data/minicom-2.7.2~20200725/src/dial.c:70: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 script[32]; data/minicom-2.7.2~20200725/src/dial.c:71: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 username[32]; data/minicom-2.7.2~20200725/src/dial.c:72: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 password[32]; data/minicom-2.7.2~20200725/src/dial.c:74: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 baud[8]; data/minicom-2.7.2~20200725/src/dial.c:75: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 parity[2]; data/minicom-2.7.2~20200725/src/dial.c:78: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 bits[2]; data/minicom-2.7.2~20200725/src/dial.c:83: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 name[32]; data/minicom-2.7.2~20200725/src/dial.c:84: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 number[32]; data/minicom-2.7.2~20200725/src/dial.c:85: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 script[32]; data/minicom-2.7.2~20200725/src/dial.c:86: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 username[32]; data/minicom-2.7.2~20200725/src/dial.c:87: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 password[32]; data/minicom-2.7.2~20200725/src/dial.c:89: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 baud[8]; data/minicom-2.7.2~20200725/src/dial.c:90: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 parity[2]; data/minicom-2.7.2~20200725/src/dial.c:93: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 bits[2]; data/minicom-2.7.2~20200725/src/dial.c:94: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 lastdate[9]; /* jl 22.06.97 */ data/minicom-2.7.2~20200725/src/dial.c:95: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 lasttime[9]; /* jl 22.06.97 */ data/minicom-2.7.2~20200725/src/dial.c:97: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 convfile[16]; /* jl 21.09.97 */ data/minicom-2.7.2~20200725/src/dial.c:98: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 stopb[2]; /* jl 10.02.2000 */ data/minicom-2.7.2~20200725/src/dial.c:106: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 name[32]; data/minicom-2.7.2~20200725/src/dial.c:107: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 number[32]; data/minicom-2.7.2~20200725/src/dial.c:108: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 script[32]; data/minicom-2.7.2~20200725/src/dial.c:109: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 username[32]; data/minicom-2.7.2~20200725/src/dial.c:110: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 password[32]; data/minicom-2.7.2~20200725/src/dial.c:112: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 baud[8]; data/minicom-2.7.2~20200725/src/dial.c:113: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 parity[2]; data/minicom-2.7.2~20200725/src/dial.c:116: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 bits[2]; data/minicom-2.7.2~20200725/src/dial.c:117: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 lastdate[9]; data/minicom-2.7.2~20200725/src/dial.c:118: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 lasttime[9]; data/minicom-2.7.2~20200725/src/dial.c:120: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 convfile[16]; data/minicom-2.7.2~20200725/src/dial.c:121: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 stopb[2]; data/minicom-2.7.2~20200725/src/dial.c:339: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). consolefd = open("/dev/console", O_WRONLY); data/minicom-2.7.2~20200725/src/dial.c:426: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[128]; data/minicom-2.7.2~20200725/src/dial.c:427: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 modbuf[128]; data/minicom-2.7.2~20200725/src/dial.c:453:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). maxretries = atoi(P_MRETRIES); data/minicom-2.7.2~20200725/src/dial.c:456:12: [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). rdelay = atoi(P_MRDELAY); data/minicom-2.7.2~20200725/src/dial.c:486:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dialtime = atoi(P_MDIALTIME); data/minicom-2.7.2~20200725/src/dial.c:711:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(d->baud, "Curr"); data/minicom-2.7.2~20200725/src/dial.c:726: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(dst, src, sizeof(*dst)); data/minicom-2.7.2~20200725/src/dial.c:732: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(dst, src, sizeof(*dst)); data/minicom-2.7.2~20200725/src/dial.c:785: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(d, &v3, offsetof(struct v3_dialent, next)); data/minicom-2.7.2~20200725/src/dial.c:804: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(d, &v3, offsetof(struct v3_dialent, next)); data/minicom-2.7.2~20200725/src/dial.c:824: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(d->username, v1.username, sizeof(v1) - offsetof(struct v1_dialent, username)); data/minicom-2.7.2~20200725/src/dial.c:858: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 dfile[256]; data/minicom-2.7.2~20200725/src/dial.c:859: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 copycmd[512]; data/minicom-2.7.2~20200725/src/dial.c:880: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). if ((fp = fopen(dfile, "r")) == NULL) { data/minicom-2.7.2~20200725/src/dial.c:1064: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 dfile[256]; data/minicom-2.7.2~20200725/src/dial.c:1077: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). if ((fp = fopen(dfile, "w")) == NULL) { data/minicom-2.7.2~20200725/src/dial.c:1460:7: [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 (atoi(d->baud) != 0) { data/minicom-2.7.2~20200725/src/dial.c:1487:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(P_BAUDRATE, "%ld", nb); data/minicom-2.7.2~20200725/src/dial.c:1520: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[128]; data/minicom-2.7.2~20200725/src/dial.c:1525:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((num = atoi(s)) != 0) { data/minicom-2.7.2~20200725/src/dial.c:1571: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 *s, dname[128]; data/minicom-2.7.2~20200725/src/dial.c:1572: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. static char manual[32]; data/minicom-2.7.2~20200725/src/file.c:140: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 f_str[BUFSIZ]; data/minicom-2.7.2~20200725/src/file.c:141: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 t_str[BUFSIZ]; data/minicom-2.7.2~20200725/src/file.c:145: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(f_str, " %%-%ds", longest + 2); data/minicom-2.7.2~20200725/src/file.c:170: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 f_str[BUFSIZ]; data/minicom-2.7.2~20200725/src/file.c:171: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 t_str[BUFSIZ]; data/minicom-2.7.2~20200725/src/file.c:174: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(f_str, " %%-%ds", longest + 2); data/minicom-2.7.2~20200725/src/file.c:203: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. static char file_title[BUFSIZ]; data/minicom-2.7.2~20200725/src/file.c:204: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. static char cwd_str[BUFSIZ]; data/minicom-2.7.2~20200725/src/file.c:210: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. static char wc_str[128] = ""; data/minicom-2.7.2~20200725/src/file.c:211: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. static char wc_mem[128] = ""; data/minicom-2.7.2~20200725/src/file.c:260: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. static char cwd_str_fmt[BUFSIZ] = ""; data/minicom-2.7.2~20200725/src/file.c:262: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 disp_dir[80]; data/minicom-2.7.2~20200725/src/file.c:770: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 buf[128]; data/minicom-2.7.2~20200725/src/file.c:800: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 tag_buf[128]; data/minicom-2.7.2~20200725/src/file.c:820: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 tag_buf[128]; data/minicom-2.7.2~20200725/src/file.c:852:21: [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[BUFSIZ]; data/minicom-2.7.2~20200725/src/getsdir.c:203: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 fpath[BUFSIZ]; /* filename with dir path prepended */ data/minicom-2.7.2~20200725/src/getsdir.h:29: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 fname[NAME_MAX + 1]; /* filename + terminating null */ data/minicom-2.7.2~20200725/src/help.c:35: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[40]; data/minicom-2.7.2~20200725/src/keyserv.c: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 buf[8]; data/minicom-2.7.2~20200725/src/keyserv.c:105:29: [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 (argc < 2 || (parent = atoi(argv[1])) == 0) { data/minicom-2.7.2~20200725/src/main.c:136: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. static char buf[16]; data/minicom-2.7.2~20200725/src/main.c:139:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "CTRL-%c ", P_ESCAPE[1]); data/minicom-2.7.2~20200725/src/main.c:143: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(buf, "ESC,"); data/minicom-2.7.2~20200725/src/main.c:145: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(buf, "Meta-"); data/minicom-2.7.2~20200725/src/main.c:261: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 bytes[128]; data/minicom-2.7.2~20200725/src/main.c:308:42: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (doinit > 0 && lockfile[0] && (fd = open(lockfile, O_RDONLY)) >= 0) { data/minicom-2.7.2~20200725/src/main.c:365:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). portfd = open(dial_tty, O_RDWR|O_NDELAY|O_NOCTTY); data/minicom-2.7.2~20200725/src/main.c:373:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). portfd = open(dial_tty, O_RDWR|O_NOCTTY); data/minicom-2.7.2~20200725/src/main.c:430: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[256]; data/minicom-2.7.2~20200725/src/main.c:504: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). num_hist_lines = atoi(P_HISTSIZE); data/minicom-2.7.2~20200725/src/main.c:564: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. static char status_message[80]; data/minicom-2.7.2~20200725/src/main.c:586: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[COLS]; data/minicom-2.7.2~20200725/src/main.c:651:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[COLS - bufi]; data/minicom-2.7.2~20200725/src/main.c:830: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[128]; data/minicom-2.7.2~20200725/src/main.c:911:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char obuf[sizeof(buf)]; data/minicom-2.7.2~20200725/src/minicom.c:228:3: [2] (buffer) wchar_t: 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. wchar_t tmp_line[MAXCOLS]; data/minicom-2.7.2~20200725/src/minicom.c:312:3: [2] (buffer) wchar_t: 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. wchar_t tmp_line[MAXCOLS]; data/minicom-2.7.2~20200725/src/minicom.c:374:3: [2] (buffer) wchar_t: 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. wchar_t tmpstr1[MAXCOLS], tmpstr2[MAXCOLS]; data/minicom-2.7.2~20200725/src/minicom.c:399:3: [2] (buffer) wchar_t: 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. wchar_t tmp_line[MAXCOLS]; data/minicom-2.7.2~20200725/src/minicom.c:416:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MB_LEN_MAX]; data/minicom-2.7.2~20200725/src/minicom.c:434:10: [2] (buffer) wchar_t: 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 wchar_t look_for[MAX_SEARCH]; /* fmg: last used search pattern */ data/minicom-2.7.2~20200725/src/minicom.c:435:3: [2] (buffer) wchar_t: 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. wchar_t tmp_line[MAXCOLS]; data/minicom-2.7.2~20200725/src/minicom.c:443: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 hline0[128], hline1[128], *hline; data/minicom-2.7.2~20200725/src/minicom.c:469:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(hline0, data/minicom-2.7.2~20200725/src/minicom.c:730:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(hline1, _(" CITATION: ENTER=select start line ESC=exit ")); data/minicom-2.7.2~20200725/src/minicom.c:747:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(hline1, _(" CITATION: ENTER=select end line ESC=exit ")); data/minicom-2.7.2~20200725/src/minicom.c:773:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(hline1, _(" CITATION: ENTER=select start line ESC=exit ")); data/minicom-2.7.2~20200725/src/minicom.c:934: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 local_charset[40]; data/minicom-2.7.2~20200725/src/minicom.c:1095: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 capname[128]; /* Name of capture file */ data/minicom-2.7.2~20200725/src/minicom.c:1098: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 *args[20]; /* New argv pointer */ data/minicom-2.7.2~20200725/src/minicom.c:1108: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 pseudo[64]; data/minicom-2.7.2~20200725/src/minicom.c:1168:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(capname, "minicom.cap"); data/minicom-2.7.2~20200725/src/minicom.c:1341: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). capfp = fopen(optarg, "a"); data/minicom-2.7.2~20200725/src/minicom.c:1446: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). num_hist_lines = atoi(P_HISTSIZE); data/minicom-2.7.2~20200725/src/minicom.c:1588: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 port_date[20] = ""; data/minicom-2.7.2~20200725/src/minicom.c:1699:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((capfp = fopen(s, "a")) == (FILE *)NULL) { data/minicom-2.7.2~20200725/src/minicom.h:96: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. EXTERN char lockfile[270]; /* UUCP lock file of terminal */ data/minicom-2.7.2~20200725/src/minicom.h:97: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. EXTERN char homedir[256]; /* Home directory of user */ data/minicom-2.7.2~20200725/src/minicom.h:98: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. EXTERN char logfname[PARS_VAL_LEN]; /* Name of the logfile */ data/minicom-2.7.2~20200725/src/minicom.h:99: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. EXTERN char username[16]; /* Who is using minicom? */ data/minicom-2.7.2~20200725/src/minicom.h:104: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. EXTERN char parfile[256]; /* Global parameter file */ data/minicom-2.7.2~20200725/src/minicom.h:105: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. EXTERN char pparfile[256]; /* Personal parameter file */ data/minicom-2.7.2~20200725/src/minicom.h:107: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. EXTERN char scr_name[256]; /* Name of last script */ data/minicom-2.7.2~20200725/src/minicom.h:108: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. EXTERN char scr_user[33]; /* Login name to use with script */ data/minicom-2.7.2~20200725/src/minicom.h:109: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. EXTERN char scr_passwd[33]; /* Password to use with script */ data/minicom-2.7.2~20200725/src/minicom.h:111: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. EXTERN char termtype[32]; /* Value of getenv("TERM"); */ data/minicom-2.7.2~20200725/src/minicom.h:157:17: [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. extern unsigned char vt_outmap[256], vt_inmap[256]; data/minicom-2.7.2~20200725/src/rwconf.c:248:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(P_SCRIPTPROG, "runscript"); data/minicom-2.7.2~20200725/src/rwconf.c:341: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 line[MAC_LEN]; data/minicom-2.7.2~20200725/src/script.c:87:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char homedir[256]; /* Home directory */ data/minicom-2.7.2~20200725/src/script.c:88:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char logfname[PARS_VAL_LEN]; /* Name of logfile */ data/minicom-2.7.2~20200725/src/script.c:90: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. static char inbuf[65]; /* Input buffer. */ data/minicom-2.7.2~20200725/src/script.c: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 envbuf[32]; data/minicom-2.7.2~20200725/src/script.c:347: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[500]; /* max length of a line - this should be dynamically! */ data/minicom-2.7.2~20200725/src/script.c:350: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). if ((fp = fopen(s, "r")) == NULL) { data/minicom-2.7.2~20200725/src/script.c:403: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(inbuf, inbuf + 1, 63); data/minicom-2.7.2~20200725/src/script.c:406:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(inbuf + 1, inbuf, 63); data/minicom-2.7.2~20200725/src/script.c:508:14: [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 ((val = atoi(text)) != 0 || *text == '0') data/minicom-2.7.2~20200725/src/script.c:660: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 received[64]; data/minicom-2.7.2~20200725/src/script.c:726: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[32]; data/minicom-2.7.2~20200725/src/sysdep1.c:423:19: [2] (integer) atol: 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 ((newbaud = (atol(baudr) / 100)) == 0 && baudr[0] != '0') data/minicom-2.7.2~20200725/src/sysdep1.c:623:37: [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). rs485conf.delay_rts_before_send = atoi(del_rts_bef_snd); data/minicom-2.7.2~20200725/src/sysdep1.c:626:36: [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). rs485conf.delay_rts_after_send = atoi(del_rts_aft_snd); data/minicom-2.7.2~20200725/src/sysdep2.c:63:13: [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). *rows = atoi(p); data/minicom-2.7.2~20200725/src/sysdep2.c:65:13: [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). *cols = atoi(p); data/minicom-2.7.2~20200725/src/sysdep2.c:239: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). while ((n = open("/dev/null", 0)) < to && n >= 0) { data/minicom-2.7.2~20200725/src/updown.c:48: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[256]; data/minicom-2.7.2~20200725/src/updown.c:49: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 err[50]; data/minicom-2.7.2~20200725/src/updown.c:50: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. static char odir[256]; data/minicom-2.7.2~20200725/src/updown.c:105: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_portfd[8]; /* kino */ data/minicom-2.7.2~20200725/src/updown.c:125:11: [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(str_portfd, "%d", portfd); data/minicom-2.7.2~20200725/src/updown.c:160:9: [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(str_portfd, "%d", portfd); data/minicom-2.7.2~20200725/src/updown.c:222:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *name[13]; data/minicom-2.7.2~20200725/src/updown.c:226: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[160]; data/minicom-2.7.2~20200725/src/updown.c:227: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 buffirst[20]; data/minicom-2.7.2~20200725/src/updown.c:228: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 xfrstr[160] = ""; data/minicom-2.7.2~20200725/src/updown.c:229: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 trimbuf[160] = ""; data/minicom-2.7.2~20200725/src/updown.c:230: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 title[64]; data/minicom-2.7.2~20200725/src/updown.c:365:9: [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). xfl=fopen("xfer.log","wb"); data/minicom-2.7.2~20200725/src/updown.c:493: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 ((fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) { data/minicom-2.7.2~20200725/src/updown.c:498: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 buf[12]; data/minicom-2.7.2~20200725/src/updown.c:628: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((char *)newe, (char *)environ , (int) (count * sizeof(char *))); data/minicom-2.7.2~20200725/src/updown.c:652: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[81]; data/minicom-2.7.2~20200725/src/updown.c:653: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 scr_lines[7]; data/minicom-2.7.2~20200725/src/updown.c:654: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 cmdline[160]; data/minicom-2.7.2~20200725/src/updown.c:724: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(scr_lines, "%d", (int) lines); /* jl 13.09.97 */ data/minicom-2.7.2~20200725/src/updown.c:823: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 line[1024]; data/minicom-2.7.2~20200725/src/updown.c:827: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[128] = ""; data/minicom-2.7.2~20200725/src/updown.c:835: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). if ((fp = fopen(s, "r")) == NULL) { data/minicom-2.7.2~20200725/src/util.c:105: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 *words[128]; data/minicom-2.7.2~20200725/src/util.c:152: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 (open(in, O_RDONLY) < 0) data/minicom-2.7.2~20200725/src/util.c:157: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 (open(out, O_WRONLY) < 0) data/minicom-2.7.2~20200725/src/util.c:162: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 (open(err, O_RDWR) < 0) data/minicom-2.7.2~20200725/src/util.c:190: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. static char next_port[PARS_VAL_LEN]; data/minicom-2.7.2~20200725/src/util.c:191: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. static char loc_port_list[PARS_VAL_LEN]; data/minicom-2.7.2~20200725/src/vt100.c:92: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. unsigned char vt_inmap[256] = { data/minicom-2.7.2~20200725/src/vt100.c:95: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. unsigned char vt_outmap[256] = { data/minicom-2.7.2~20200725/src/vt100.c:132: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. static char *vt_trans[2]; data/minicom-2.7.2~20200725/src/vt100.c:170: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. static char *savetrans[2]; data/minicom-2.7.2~20200725/src/vt100.c:422:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[32]; data/minicom-2.7.2~20200725/src/vt100.c:521:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "\033[%d;%dR", vt_win->cury + 1, vt_win->curx + 1); data/minicom-2.7.2~20200725/src/vt100.c:535: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(temp, "\033[%c;1;1;120;120;1;0x", escparms[0] == 1 ? '3' : '2'); data/minicom-2.7.2~20200725/src/vt100.c:748:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[10]; data/minicom-2.7.2~20200725/src/vt100.c:885: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. static char buf[17]; data/minicom-2.7.2~20200725/src/vt100.c:949:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[36]; data/minicom-2.7.2~20200725/src/vt100.c:1117: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 s[3]; data/minicom-2.7.2~20200725/src/windiv.c:44: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[128]; data/minicom-2.7.2~20200725/src/window.c:89: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. static char _bufstart[BUFFERSIZE]; data/minicom-2.7.2~20200725/src/window.c:130: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 lala[80]; data/minicom-2.7.2~20200725/src/window.c:226: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[12]; data/minicom-2.7.2~20200725/src/window.c:227: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(buf, "\033[%d;%dm", COLFG(color) + 30, COLBG(color) + 40); data/minicom-2.7.2~20200725/src/window.c:371: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. char buf[MB_LEN_MAX]; data/minicom-2.7.2~20200725/src/window.c:533: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(e, gmap + COLS * y + x1, bytes); data/minicom-2.7.2~20200725/src/window.c:866: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((char *)f, (char *)e, win->xs * sizeof(ELM)); data/minicom-2.7.2~20200725/src/window.c:893: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((char *)dst, (char *)src, len); data/minicom-2.7.2~20200725/src/window.c:896:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((char *)src, (char *)dst, len); data/minicom-2.7.2~20200725/src/window.c:1112: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[160]; data/minicom-2.7.2~20200725/src/window.c:1467: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((char *)f, (char *)e, w->xs * sizeof(ELM)); data/minicom-2.7.2~20200725/src/window.c:1591: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(buf, gmap + COLS * y + x, sizeof(ELM) * len); data/minicom-2.7.2~20200725/src/window.c:1673:3: [2] (buffer) wchar_t: 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. wchar_t buf[BUFLEN]; data/minicom-2.7.2~20200725/src/window.c:1820:3: [2] (buffer) wchar_t: 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. wchar_t buf[BUFLEN]; data/minicom-2.7.2~20200725/src/window.c:1833: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. char tmp[MB_LEN_MAX]; data/minicom-2.7.2~20200725/src/window.c:1840:8: [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(sptr, tmp, l); data/minicom-2.7.2~20200725/src/window.c:1850: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. static char tbuf[1024]; data/minicom-2.7.2~20200725/src/window.c:1851: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. static char cbuf[2048]; data/minicom-2.7.2~20200725/src/wkeys.c:94: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. static char buf[32]; data/minicom-2.7.2~20200725/src/wkeys.c:170:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char mem[8]; data/minicom-2.7.2~20200725/src/wkeys.c:176:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[8]; data/minicom-2.7.2~20200725/extras/dialdir-32b-to-64b-up-to-v5.c:68:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_len = read(fd, data, sizeof(data)); data/minicom-2.7.2~20200725/extras/dialdir-32b-to-64b-up-to-v5.c:82: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). if (ret != strlen(argv[1]) + strlen(".i386")) { data/minicom-2.7.2~20200725/extras/dialdir-32b-to-64b-up-to-v5.c:82:32: [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 (ret != strlen(argv[1]) + strlen(".i386")) { data/minicom-2.7.2~20200725/lib/getopt.c:237: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). extern int strlen (const char *); data/minicom-2.7.2~20200725/lib/getopt.c:398:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nonoption_flags_len = strlen (nonoption_flags); data/minicom-2.7.2~20200725/lib/getopt.c:606: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). == (unsigned int) strlen (p->name)) data/minicom-2.7.2~20200725/lib/getopt.c:630: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). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/getopt.c:660: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). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/getopt.c:676: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). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/getopt.c:681: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). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/getopt.c:792:51: [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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/minicom-2.7.2~20200725/lib/getopt.c:815:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/getopt.c:835: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). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/getopt.c:849: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). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/getopt.c:853:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/minicom-2.7.2~20200725/lib/libport.h:18:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. int usleep(unsigned usecs); data/minicom-2.7.2~20200725/lib/snprintf.c:217: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(strcpy(buf, p)); data/minicom-2.7.2~20200725/lib/snprintf.c:567: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). s_len = strlen(s); data/minicom-2.7.2~20200725/lib/snprintf.c:611:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s_len = strlen(s); data/minicom-2.7.2~20200725/lib/usleep.c:8:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. int usleep(unsigned usecs) data/minicom-2.7.2~20200725/src/ascii-xfr.c:58:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000 * ms); data/minicom-2.7.2~20200725/src/ascii-xfr.c:131:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read (STDIN_FILENO, line, sizeof(line)); data/minicom-2.7.2~20200725/src/ascii-xfr.c:219:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(STDIN_FILENO, line, sizeof(line))) > 0) { data/minicom-2.7.2~20200725/src/common.c:128:14: [1] (buffer) wcslen: 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 l = wcslen(wcs); data/minicom-2.7.2~20200725/src/config.c:90:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, P_PNAME(f) - 2, sizeof(buf)); data/minicom-2.7.2~20200725/src/config.c:147:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, s, sizeof(buf)-1); data/minicom-2.7.2~20200725/src/config.c:150:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(buf, "."); data/minicom-2.7.2~20200725/src/config.c:189: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). (home = getenv("HOME")) && strlen(s) + strlen(home) <= maxl) { data/minicom-2.7.2~20200725/src/config.c:189:46: [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). (home = getenv("HOME")) && strlen(s) + strlen(home) <= maxl) { data/minicom-2.7.2~20200725/src/config.c:191: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). memmove(s + strlen(home), s + 1, strlen(s)); data/minicom-2.7.2~20200725/src/config.c:191: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). memmove(s + strlen(home), s + 1, strlen(s)); data/minicom-2.7.2~20200725/src/config.c:192: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). memcpy(s, home, strlen(home)); data/minicom-2.7.2~20200725/src/config.c:850:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, defaults[loc], PARS_VAL_LEN); data/minicom-2.7.2~20200725/src/config.c:1179:11: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(P_HISTSIZE,"0"); data/minicom-2.7.2~20200725/src/config.c:1344:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pgets(w, strlen(msg_answerback) + 1, 5, P_ANSWERBACK, 50, 50, 0); data/minicom-2.7.2~20200725/src/config.c:1399:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(P_MACROS) == 0) { /* fmg - they might want to know... */ data/minicom-2.7.2~20200725/src/config.c:1473: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). s = parfile + strlen(CONFDIR) + 8; data/minicom-2.7.2~20200725/src/config.c:1475: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). s = pparfile + strlen(homedir) + 9; data/minicom-2.7.2~20200725/src/dial.c:402:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(350000); data/minicom-2.7.2~20200725/src/dial.c:562:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). !strncmp(modbuf, P_MCONNECT, strlen(P_MCONNECT))) { data/minicom-2.7.2~20200725/src/dial.c:566: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). if (sscanf(modbuf + strlen(P_MCONNECT), "%ld", &nb) == 1) data/minicom-2.7.2~20200725/src/dial.c:646: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). if ((*t) && (!strncmp(modbuf, t, strlen(t)))) { data/minicom-2.7.2~20200725/src/dial.c:712:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(d->bits, "8"); data/minicom-2.7.2~20200725/src/dial.c:713:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(d->parity, "N"); data/minicom-2.7.2~20200725/src/dial.c:718:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(d->stopb, "1"); data/minicom-2.7.2~20200725/src/dial.c:771:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(d->stopb, "1"); data/minicom-2.7.2~20200725/src/dial.c:791:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(d->stopb, "1"); data/minicom-2.7.2~20200725/src/dial.c:811:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(d->stopb, "1"); data/minicom-2.7.2~20200725/src/dial.c:825:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d->name, v1.name, sizeof(d->name)); data/minicom-2.7.2~20200725/src/dial.c:827:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d->number, v1.number, sizeof(d->number)); data/minicom-2.7.2~20200725/src/dial.c:829:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d->script, v1.script, sizeof(d->script)); data/minicom-2.7.2~20200725/src/dial.c:835:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(d->stopb, "1"); data/minicom-2.7.2~20200725/src/dial.c:873:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(d_man->name, _("Manually entered number"), sizeof(d_man->name)); data/minicom-2.7.2~20200725/src/dial.c:1076:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(077); data/minicom-2.7.2~20200725/src/dial.c:1078:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/minicom-2.7.2~20200725/src/dial.c:1083:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/minicom-2.7.2~20200725/src/dial.c:1156:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, s, l); data/minicom-2.7.2~20200725/src/dial.c:1582: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). tagmvlen = strlen(_(move_exit)); data/minicom-2.7.2~20200725/src/dial.c:1583: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(_(tag_exit)) > tagmvlen) data/minicom-2.7.2~20200725/src/dial.c:1584: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). tagmvlen = strlen(_(tag_exit)); data/minicom-2.7.2~20200725/src/dial.c:1883:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d_man->number, manual, sizeof(d_man->number)); data/minicom-2.7.2~20200725/src/file.c:293:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). min_len += strlen(homedir) + 1; data/minicom-2.7.2~20200725/src/file.c:294: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). min_len += strlen(s); data/minicom-2.7.2~20200725/src/file.c:301:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(work_dir, s, min_len); data/minicom-2.7.2~20200725/src/file.c:306: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(work_dir) > 1 && work_dir[strlen(work_dir) - 1] == '/') data/minicom-2.7.2~20200725/src/file.c:306: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). if (strlen(work_dir) > 1 && work_dir[strlen(work_dir) - 1] == '/') data/minicom-2.7.2~20200725/src/file.c:307: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). work_dir[strlen(work_dir) - 1] = (char)0; data/minicom-2.7.2~20200725/src/file.c:329:43: [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). work_dir = set_work_dir(new_prev_dir, strlen(new_prev_dir)); data/minicom-2.7.2~20200725/src/file.c:364:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((new_dp_len = strlen(work_dir)) > dp_len) { data/minicom-2.7.2~20200725/src/file.c:452:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(work_dir) == 0) data/minicom-2.7.2~20200725/src/file.c:453:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(work_dir, "/"); data/minicom-2.7.2~20200725/src/file.c:459: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). int new_len = strlen(work_dir) + 1; /* + '/' */ data/minicom-2.7.2~20200725/src/file.c:460:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((new_len += strlen(new_dir) + 1) > min_len) { data/minicom-2.7.2~20200725/src/file.c:465:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(work_dir, "/"); data/minicom-2.7.2~20200725/src/file.c:470:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). new_len += strlen(homedir) + 1; data/minicom-2.7.2~20200725/src/file.c:471: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). new_len += strlen(new_dir); data/minicom-2.7.2~20200725/src/file.c:478:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(work_dir, new_dir, min_len); data/minicom-2.7.2~20200725/src/file.c:549: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). len += strlen(d->fname) + 1; data/minicom-2.7.2~20200725/src/file.c:564:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = strlen(ret_buf), j = d->fname; *j; j++) { data/minicom-2.7.2~20200725/src/file.c:578: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). ret_buf[strlen(ret_buf) - 1] = (char)0; data/minicom-2.7.2~20200725/src/file.c:772:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, down_loading? P_DOWNDIR : P_UPDIR, sizeof(buf)); data/minicom-2.7.2~20200725/src/file.c:802:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tag_buf, wc_mem, 128); data/minicom-2.7.2~20200725/src/file.c:823:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tag_buf, wc_mem, 128); data/minicom-2.7.2~20200725/src/getsdir.c:236:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*datptr)[cnt].fname, dp->d_name, NAME_MAX + 1); data/minicom-2.7.2~20200725/src/getsdir.c:247: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). if ((l = strlen(dp->d_name)) > *len) data/minicom-2.7.2~20200725/src/help.c:42: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). mc_wlocate(w, (x2 - x1) / 2 - strlen(s) / 2, 0); data/minicom-2.7.2~20200725/src/help.c:47: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). mc_wlocate(w, (x2 - x1) / 2 - strlen(buf) / 2, 2); data/minicom-2.7.2~20200725/src/help.c:72: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). mc_wlocate(w, (x2 - x1) / 2 - strlen(s) / 2, 16); data/minicom-2.7.2~20200725/src/ipc.c:33:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int i = read(fd, buf, bufsize - 1); data/minicom-2.7.2~20200725/src/keyserv.c:74:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(from_minicom, buf, 8); data/minicom-2.7.2~20200725/src/keyserv.c:81:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(from_minicom, buf + n, 1); data/minicom-2.7.2~20200725/src/keyserv.c:92: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). write(1, s, strlen(s)); data/minicom-2.7.2~20200725/src/keyserv.c:161:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f = read(0, &ch, 1); data/minicom-2.7.2~20200725/src/main.c:66:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res, s + 5, reslen - 1); data/minicom-2.7.2~20200725/src/main.c:77:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res, p, reslen - 1); data/minicom-2.7.2~20200725/src/main.c:96: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). if (!strncmp(devpath, cutoff[i], strlen(cutoff[i]))) data/minicom-2.7.2~20200725/src/main.c:98: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). devpath += strlen(cutoff[i]); data/minicom-2.7.2~20200725/src/main.c:102:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(devpath); data/minicom-2.7.2~20200725/src/main.c:107:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, devpath, buflen); data/minicom-2.7.2~20200725/src/main.c:162:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sa_un.sun_path, data/minicom-2.7.2~20200725/src/main.c:163: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). dial_tty + strlen(SOCKET_PREFIX_UNIX), data/minicom-2.7.2~20200725/src/main.c:188: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). char *s_addr = s + strlen(SOCKET_PREFIX_TCP); data/minicom-2.7.2~20200725/src/main.c:197: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(s_addr) == 0) data/minicom-2.7.2~20200725/src/main.c:274: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 ulen = strlen(SOCKET_PREFIX_UNIX); data/minicom-2.7.2~20200725/src/main.c:275:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(ulen == strlen(SOCKET_PREFIX_UNIX_LEGACY)); data/minicom-2.7.2~20200725/src/main.c:280:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (!strncmp(dial_tty, SOCKET_PREFIX_TCP, strlen(SOCKET_PREFIX_TCP))) data/minicom-2.7.2~20200725/src/main.c:309:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buf.bytes, 127); data/minicom-2.7.2~20200725/src/main.c:433:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(s); data/minicom-2.7.2~20200725/src/main.c:450:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(vt_ch_delay * 1000); data/minicom-2.7.2~20200725/src/main.c:588:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(fmt); data/minicom-2.7.2~20200725/src/main.c:732:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(status_message, text, sizeof(status_message)); data/minicom-2.7.2~20200725/src/main.c:734: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). l = strlen(status_message); data/minicom-2.7.2~20200725/src/minicom.c:239:9: [1] (buffer) wcslen: 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 (wcslen(look) > 1 && wcslen(tmp_line) > 1) { data/minicom-2.7.2~20200725/src/minicom.c:239:29: [1] (buffer) wcslen: 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 (wcslen(look) > 1 && wcslen(tmp_line) > 1) { data/minicom-2.7.2~20200725/src/minicom.c:339:9: [1] (buffer) wcslen: 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 (wcslen(tmp_line) > 1 && wcslen(look) > 1) data/minicom-2.7.2~20200725/src/minicom.c:339:33: [1] (buffer) wcslen: 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 (wcslen(tmp_line) > 1 && wcslen(look) > 1) data/minicom-2.7.2~20200725/src/minicom.c:532:13: [1] (buffer) wcslen: 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 (wcslen(look_for) > 1) { data/minicom-2.7.2~20200725/src/minicom.c:560:13: [1] (buffer) wcslen: 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 (wcslen(look_for) > 1) { data/minicom-2.7.2~20200725/src/minicom.c:608:15: [1] (buffer) wcslen: 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 (wcslen(look_for) > 1) { data/minicom-2.7.2~20200725/src/minicom.c:611:24: [1] (buffer) wcslen: 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). inverse = (wcslen(tmp_line)>1 && data/minicom-2.7.2~20200725/src/minicom.c:656:15: [1] (buffer) wcslen: 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 (wcslen(look_for) > 1) { data/minicom-2.7.2~20200725/src/minicom.c:659:24: [1] (buffer) wcslen: 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). inverse = (wcslen(tmp_line)>1 && data/minicom-2.7.2~20200725/src/minicom.c:692:13: [1] (buffer) wcslen: 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 (wcslen(look_for) > 1 && us->histline) data/minicom-2.7.2~20200725/src/minicom.c:718:13: [1] (buffer) wcslen: 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 (wcslen(look_for) > 1 && us->histline) data/minicom-2.7.2~20200725/src/minicom.c:1177:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(termtype, getenv("TERM") ? getenv("TERM") : "dumb", sizeof(termtype)); data/minicom-2.7.2~20200725/src/minicom.c:1299:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(termtype, optarg, sizeof(termtype)); data/minicom-2.7.2~20200725/src/minicom.c:1367:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scr_name, optarg, sizeof(scr_name) - 1); data/minicom-2.7.2~20200725/src/minicom.c:1435:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(homedir, pwd->pw_dir, sizeof(homedir)); data/minicom-2.7.2~20200725/src/minicom.c:1437:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(homedir, s, sizeof(homedir)); data/minicom-2.7.2~20200725/src/minicom.c:1439:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(username, pwd->pw_name, sizeof(username)); data/minicom-2.7.2~20200725/src/minicom.c:1474:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(P_PORT, cmdline_device, sizeof(P_PORT)); data/minicom-2.7.2~20200725/src/rwconf.c:259: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). if (line[strlen(line) - 1] != '\n') { data/minicom-2.7.2~20200725/src/rwconf.c:261:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fseek(fp, -strlen(line), SEEK_CUR); data/minicom-2.7.2~20200725/src/rwconf.c:278:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s) >= 3 data/minicom-2.7.2~20200725/src/rwconf.c:288: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). if (strncmp(p->desc, s, strlen(p->desc))) data/minicom-2.7.2~20200725/src/rwconf.c:292:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s) > strlen(p->desc) data/minicom-2.7.2~20200725/src/rwconf.c:292:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s) > strlen(p->desc) data/minicom-2.7.2~20200725/src/rwconf.c:293: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). && !isspace(s[strlen(p->desc)])) data/minicom-2.7.2~20200725/src/rwconf.c:299: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). s += strlen(p->desc); data/minicom-2.7.2~20200725/src/rwconf.c:304:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while (isspace(s[strlen(s) - 1])) data/minicom-2.7.2~20200725/src/rwconf.c:305:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s[strlen(s) - 1] = 0; data/minicom-2.7.2~20200725/src/rwconf.c:312:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p->value, s, sizeof(p->value) - 1); data/minicom-2.7.2~20200725/src/script.c:270:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(envbuf, &t[len + 2], f - len - 2); data/minicom-2.7.2~20200725/src/script.c:310: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/minicom-2.7.2~20200725/src/script.c:358:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(t) == sizeof(buf) - 1) { data/minicom-2.7.2~20200725/src/script.c:394:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(0, &c, 1)) != 1) data/minicom-2.7.2~20200725/src/script.c:427: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/minicom-2.7.2~20200725/src/script.c:665:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/minicom-2.7.2~20200725/src/script.c:692:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/minicom-2.7.2~20200725/src/script.c:733: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(buf); data/minicom-2.7.2~20200725/src/script.c:1028: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). if (w == NULL || *w == '#' || w[strlen(w) - 1] == ':') data/minicom-2.7.2~20200725/src/script.c:1110:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(logfname, argv[2], sizeof(logfname)); data/minicom-2.7.2~20200725/src/script.c:1113:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(homedir, argv[3], sizeof(homedir)); data/minicom-2.7.2~20200725/src/script.c:1115:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(homedir, s, sizeof(homedir)); data/minicom-2.7.2~20200725/src/sysdep1.c:331:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(fd, &c, 1); data/minicom-2.7.2~20200725/src/updown.c:117: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). translation_length += strlen(dial_tty); data/minicom-2.7.2~20200725/src/updown.c:121: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). translation_length += strlen(P_BAUDRATE); data/minicom-2.7.2~20200725/src/updown.c:126: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). translation_length += strlen(str_portfd); data/minicom-2.7.2~20200725/src/updown.c:151: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). ptr += strlen(dial_tty); data/minicom-2.7.2~20200725/src/updown.c:156: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). ptr += strlen(P_BAUDRATE); data/minicom-2.7.2~20200725/src/updown.c:162: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). ptr += strlen(str_portfd); data/minicom-2.7.2~20200725/src/updown.c:287: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). cmdline_length = strlen(P_PPROG(g)) + strlen((char*) (multiple == 0 ? "" : s)) + 1; /* + 1 for ' ' */ data/minicom-2.7.2~20200725/src/updown.c:287:43: [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). cmdline_length = strlen(P_PPROG(g)) + strlen((char*) (multiple == 0 ? "" : s)) + 1; /* + 1 for ' ' */ data/minicom-2.7.2~20200725/src/updown.c:367:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(pipefd[0], buf, sizeof(buf) - 1)) > 0) { data/minicom-2.7.2~20200725/src/updown.c:377:13: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(buf, "%19s", buffirst)) { /* if / jl 29.09.97 */ data/minicom-2.7.2~20200725/src/updown.c:388:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (xfrstr, buf, sizeof(xfrstr)); data/minicom-2.7.2~20200725/src/updown.c:491:7: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). n = umask(022); data/minicom-2.7.2~20200725/src/updown.c:501:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (write(fd, buf, strlen(buf)) < (ssize_t)strlen(buf)) data/minicom-2.7.2~20200725/src/updown.c:501:48: [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 (write(fd, buf, strlen(buf)) < (ssize_t)strlen(buf)) data/minicom-2.7.2~20200725/src/updown.c:506:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(n); data/minicom-2.7.2~20200725/src/updown.c:598: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). if ((p = malloc(strlen(name) + strlen(value) + 3)) == NULL) data/minicom-2.7.2~20200725/src/updown.c:598:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((p = malloc(strlen(name) + strlen(value) + 3)) == NULL) data/minicom-2.7.2~20200725/src/updown.c:717:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scr_user, l, sizeof(scr_user)); data/minicom-2.7.2~20200725/src/updown.c:719:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scr_name, s, sizeof(scr_name)); data/minicom-2.7.2~20200725/src/updown.c:721:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scr_passwd, p, sizeof(scr_passwd)); data/minicom-2.7.2~20200725/src/updown.c:789:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && (n = read(fds[i].fd, buf, sizeof(buf)-1)) > 0) { data/minicom-2.7.2~20200725/src/updown.c:864: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). bdone += strlen(line) + 2; data/minicom-2.7.2~20200725/src/updown.c:868: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). bdone += strlen(s); data/minicom-2.7.2~20200725/src/updown.c:872:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(ldelay * 1000); data/minicom-2.7.2~20200725/src/util.c:119:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(p, p + 1, strlen(p+1)); data/minicom-2.7.2~20200725/src/util.c:197:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(loc_port_list, port_list, PARS_VAL_LEN); data/minicom-2.7.2~20200725/src/util.c:199: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). ep = &loc_port_list[strlen(loc_port_list)]; data/minicom-2.7.2~20200725/src/util.c:208:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(next_port, sp, PARS_VAL_LEN); data/minicom-2.7.2~20200725/src/util.c:211: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). for (sp += strlen(next_port); sp != ep && *sp != '/'; ++sp) data/minicom-2.7.2~20200725/src/vt100.c:1136:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000 * vt_nl_delay); data/minicom-2.7.2~20200725/src/window.c:136:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write(2, lala, strlen(lala)); data/minicom-2.7.2~20200725/src/window.c:1688:14: [1] (buffer) wcslen: 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 ((idx = wcslen(s)) > linelen) data/minicom-2.7.2~20200725/src/window.c:1690:3: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). wcsncpy(buf, s, ARRAY_SIZE(buf)); data/minicom-2.7.2~20200725/src/window.c:1727:15: [1] (buffer) wcslen: 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). idx = wcslen(buf); data/minicom-2.7.2~20200725/src/window.c:1777:20: [1] (buffer) wcslen: 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 ((i = wcslen(buf)) > linelen) data/minicom-2.7.2~20200725/src/window.c:1791:6: [1] (buffer) wcslen: 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). f = wcslen(buf) + 2; data/minicom-2.7.2~20200725/src/wkeys.c:107:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lastread = read(0, buf, 32); data/minicom-2.7.2~20200725/src/wkeys.c:153: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). _keys[i].len = strlen(_keys[i].cap); data/minicom-2.7.2~20200725/src/wkeys.c:218:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nfound = read(0, &c, 1)) < 0 && (errno == EINTR && !gotalrm)) data/minicom-2.7.2~20200725/src/wkeys.c:247:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(temp, mem, len); ANALYSIS SUMMARY: Hits = 581 Lines analyzed = 20307 in approximately 0.60 seconds (33993 lines/second) Physical Source Lines of Code (SLOC) = 14973 Hits@level = [0] 211 [1] 195 [2] 279 [3] 35 [4] 71 [5] 1 Hits@level+ = [0+] 792 [1+] 581 [2+] 386 [3+] 107 [4+] 72 [5+] 1 Hits/KSLOC@level+ = [0+] 52.8952 [1+] 38.8032 [2+] 25.7797 [3+] 7.1462 [4+] 4.80866 [5+] 0.0667869 Dot directories skipped = 3 (--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.