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/kbtin-1.0.20/action.c Examining data/kbtin-1.0.20/alias.c Examining data/kbtin-1.0.20/antisub.c Examining data/kbtin-1.0.20/files.c Examining data/kbtin-1.0.20/glob.c Examining data/kbtin-1.0.20/help.c Examining data/kbtin-1.0.20/highlight.c Examining data/kbtin-1.0.20/history.c Examining data/kbtin-1.0.20/ivars.c Examining data/kbtin-1.0.20/llist.c Examining data/kbtin-1.0.20/main.c Examining data/kbtin-1.0.20/misc.c Examining data/kbtin-1.0.20/net.c Examining data/kbtin-1.0.20/parse.c Examining data/kbtin-1.0.20/path.c Examining data/kbtin-1.0.20/session.c Examining data/kbtin-1.0.20/substitute.c Examining data/kbtin-1.0.20/ticks.c Examining data/kbtin-1.0.20/utils.c Examining data/kbtin-1.0.20/variables.c Examining data/kbtin-1.0.20/events.c Examining data/kbtin-1.0.20/user.c Examining data/kbtin-1.0.20/run.c Examining data/kbtin-1.0.20/colors.c Examining data/kbtin-1.0.20/routes.c Examining data/kbtin-1.0.20/bind.c Examining data/kbtin-1.0.20/telnet.c Examining data/kbtin-1.0.20/hash.c Examining data/kbtin-1.0.20/regexp.c Examining data/kbtin-1.0.20/prof.c Examining data/kbtin-1.0.20/hooks.c Examining data/kbtin-1.0.20/unicode.c Examining data/kbtin-1.0.20/user_pipe.c Examining data/kbtin-1.0.20/user_tty.c Examining data/kbtin-1.0.20/wcwidth.c Examining data/kbtin-1.0.20/chinese.c Examining data/kbtin-1.0.20/print.c Examining data/kbtin-1.0.20/ssl.c Examining data/kbtin-1.0.20/pty.c Examining data/kbtin-1.0.20/globals.c Examining data/kbtin-1.0.20/tintin.h Examining data/kbtin-1.0.20/unicode.h Examining data/kbtin-1.0.20/translit.h Examining data/kbtin-1.0.20/malloc.h Examining data/kbtin-1.0.20/tests/get-utf8.c Examining data/kbtin-1.0.20/tests/ttyrec2ansi.c FINAL RESULTS: data/kbtin-1.0.20/action.c:37: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(nptr->left, K_ACTION_MAGIC); data/kbtin-1.0.20/action.c:190:17: [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(ln->left, K_ACTION_MAGIC); data/kbtin-1.0.20/action.c:237:17: [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(ln->left, K_ACTION_MAGIC); data/kbtin-1.0.20/action.c:282: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(result, arg); data/kbtin-1.0.20/action.c:306:17: [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(result, (*pvars)[n]); data/kbtin-1.0.20/colors.c:388: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(TXT, OUT); data/kbtin-1.0.20/colors.c:416: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(txt, MUDcolors[c&0xf]); data/kbtin-1.0.20/colors.c:421: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(line, buf); data/kbtin-1.0.20/files.c:79:5: [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, BUFFER_SIZE*4, fmt, ap); data/kbtin-1.0.20/files.c:135: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(cptr, buffer); data/kbtin-1.0.20/files.c:221:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%s%s%s\n", prefix, txt, suffix, ses->logtype?"":"\r"); data/kbtin-1.0.20/files.c:530:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. if (vsnprintf(buf, BUFFER_SIZE-1, format, ap)>BUFFER_SIZE-2) data/kbtin-1.0.20/files.c:603:17: [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(buffer, cptr); data/kbtin-1.0.20/files.c:610: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(buffer, line); data/kbtin-1.0.20/files.c:1042:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. result+=sprintf(result, "%c%s {%s}", tintin_char, command, left); data/kbtin-1.0.20/files.c:1044:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. result+=sprintf(result, " {%s}", right); data/kbtin-1.0.20/files.c:1046:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. result+=sprintf(result, " {%s}", pr); data/kbtin-1.0.20/glob.c:95: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(m1, pattern); data/kbtin-1.0.20/glob.c:112: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(m1, pattern); data/kbtin-1.0.20/help.c:18:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sysfile, "%s%s", filestring, COMPRESSION_EXT); data/kbtin-1.0.20/help.c:34:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filestring, "%s/KBtin_help", DEFAULT_FILE_DIR); data/kbtin-1.0.20/help.c:40:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filestring, "%s/KBtin_help", DATA_PATH); data/kbtin-1.0.20/help.c:46:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filestring, "%s_help", tintin_exec); data/kbtin-1.0.20/help.c:51:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filestring, "%s/KBtin_help", getenv("HOME")); data/kbtin-1.0.20/help.c:75:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text, "~%s", arg); data/kbtin-1.0.20/highlight.c:165:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(left, "%s~7~, ", cNames[i].name); data/kbtin-1.0.20/highlight.c:167:27: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. tmp1+=sprintf(tmp1, "~%i~%-20s ", cNames[i].num, left); data/kbtin-1.0.20/highlight.c:169:27: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. tmp1+=sprintf(tmp1, "~7~%-20s ", left); data/kbtin-1.0.20/history.c:36: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(temp, cptr+2); data/kbtin-1.0.20/history.c:45:17: [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(temp, cptr+2); data/kbtin-1.0.20/history.c:53:21: [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(buffer, history[i]); data/kbtin-1.0.20/hooks.c:117: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(vars[0], data); data/kbtin-1.0.20/hooks.c:118: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(vars[1], data); data/kbtin-1.0.20/llist.c:177: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(newnode->left, ltext); data/kbtin-1.0.20/llist.c:178: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(newnode->right, rtext); data/kbtin-1.0.20/llist.c:180: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(newnode->pr, prtext); data/kbtin-1.0.20/main.c:283:5: [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, msg, ap); data/kbtin-1.0.20/main.c:404:21: [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(temp, home); data/kbtin-1.0.20/main.c:408:17: [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(temp, DEFAULT_FILE_DIR); data/kbtin-1.0.20/main.c:416:17: [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(temp, home); data/kbtin-1.0.20/main.c:440: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(status, EMPTY_LINE); data/kbtin-1.0.20/main.c:631:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prev_command, done_input); data/kbtin-1.0.20/main.c:728: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(linebuffer, ses->last_line); data/kbtin-1.0.20/main.c:777: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(ses->last_line, linebuffer); data/kbtin-1.0.20/main.c:860:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(strchr(line, 0), "%s", ses->partial_line_marker); data/kbtin-1.0.20/main.c:916:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. optr+=sprintf(optr, ECHO_COLOR); data/kbtin-1.0.20/misc.c:495:17: [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(vars[counter], (*pvars)[counter]); data/kbtin-1.0.20/misc.c:669: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(status, EMPTY_LINE); data/kbtin-1.0.20/misc.c:729:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(cmd)) data/kbtin-1.0.20/misc.c:835:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tbuf, "%25s", tmp->strng); data/kbtin-1.0.20/misc.c:837:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tbuf, "%s%25s", tbuf, tmp->strng); data/kbtin-1.0.20/misc.c:874: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(newcomp, buff); data/kbtin-1.0.20/misc.c:892:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buff, "#New word %s added to tab completion list.", arg); data/kbtin-1.0.20/misc.c:916: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(c_buff, tmp->strng); data/kbtin-1.0.20/misc.c:921: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(c_buff, tmp->strng); data/kbtin-1.0.20/misc.c:998:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. bptr+=sprintf(bptr, ", keypad: %s", keypad?"alt mode":"cursor/numeric mode"); data/kbtin-1.0.20/parse.c:155:17: [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(arg, (*pvars)[0]); data/kbtin-1.0.20/parse.c:180: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(vars[0], arg); data/kbtin-1.0.20/parse.c:188: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(arg, al); /* alias can #unalias itself */ data/kbtin-1.0.20/parse.c:292:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "{%s} {%s}", ch, txt+1); data/kbtin-1.0.20/parse.c:370: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(cmd, command); data/kbtin-1.0.20/path.c:77:18: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. r += sprintf(r, "%s%s", ln->left, ln->next?";":""); data/kbtin-1.0.20/path.c:111:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. r+=sprintf(r, isatom(ln->left)? "%s" : "{%s}" , ln->left); data/kbtin-1.0.20/path.c:144:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. r+=sprintf(r, "%s;", ln->left); data/kbtin-1.0.20/path.c:201: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(command, ln->right); data/kbtin-1.0.20/print.c:20: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(line, cptr); data/kbtin-1.0.20/print.c:38: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(line, cptr); data/kbtin-1.0.20/print.c:71:15: [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. int n=vsnprintf(buf, BUFFER_SIZE-1, format, ap); data/kbtin-1.0.20/print.c:90:15: [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. int n=vsnprintf(buf, BUFFER_SIZE-1, format, ap); data/kbtin-1.0.20/pty.c:128: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(PtyName, PtyProto); data/kbtin-1.0.20/pty.c:129: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(TtyName, TtyProto); data/kbtin-1.0.20/pty.c:143:17: [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(TtyName, R_OK | W_OK)) data/kbtin-1.0.20/run.c:25:30: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define battr(c, a, b) bptr+=sprintf(bptr, " %s%s~7~", (ta.c_##c&a)?"~9~":"~2~-~4~", b); data/kbtin-1.0.20/run.c:191:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "exec %s", command); data/kbtin-1.0.20/run.c:255:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "exec %s", command); data/kbtin-1.0.20/run.c:293:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len=sprintf(out, "%s\n", line); data/kbtin-1.0.20/session.c:79: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(str, t); data/kbtin-1.0.20/session.c:148: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(host, space_out(right)); data/kbtin-1.0.20/session.c:254:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "#SESSION '%s' ACTIVATED.", activesession->name); data/kbtin-1.0.20/session.c:391:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s\n", ses->last_line); data/kbtin-1.0.20/session.c:396:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "#SESSION '%s' DIED.", ses->name); data/kbtin-1.0.20/substitute.c:162:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(line, EMPTY_LINE); data/kbtin-1.0.20/substitute.c:208: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(_, left); data/kbtin-1.0.20/substitute.c:219: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(_, EMPTY_LINE); data/kbtin-1.0.20/telnet.c:163:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(nego, "%c%c%c%c%s%c%c", IAC, SB, data/kbtin-1.0.20/unicode.h:6:15: [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. #define WCcpy wcscpy data/kbtin-1.0.20/user_tty.c:173:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. tbuf+=sprintf(tbuf, "\033[1;%df\033[41;33;1m[\033[41;35m%s\033[41;33m]\033[37;40;0m", data/kbtin-1.0.20/user_tty.c:177:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. tbuf+=sprintf(tbuf, "\033[2;%df\033[41;33;1m[\033[41;35m%s\033[41;33m]\033[37;40;0m", data/kbtin-1.0.20/user_tty.c:381: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(new, out_line); data/kbtin-1.0.20/user_tty.c:566: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(b_draft, txt); data/kbtin-1.0.20/user_tty.c:713:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, "ESCO"WCC, (WCI)ch); data/kbtin-1.0.20/user_tty.c:722:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, "ESC[["WCC, (WCI)ch); data/kbtin-1.0.20/user_tty.c:822:21: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, "ESC["WCC, (WCI)ch); data/kbtin-1.0.20/user_tty.c:946:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, "Alt-"WCC, (WCI)ch); data/kbtin-1.0.20/user_tty.c:956:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, "Alt-^"WCC, (WCI)(ch+64)); data/kbtin-1.0.20/user_tty.c:1384:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, "^"WCC, (WCI)(ch+64)); data/kbtin-1.0.20/user_tty.c:1627:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(done_input, "~12~KB~3~tin ~7~%s by ~11~kilobyte@angband.pl~9~\n", VERSION); data/kbtin-1.0.20/user_tty.c:1688:24: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. s+=sprintf(s, "\033[0%s;3%dm", ((c)&8)?";1":"", rgbbgr[(c)&7]); data/kbtin-1.0.20/user_tty.c:1728:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. if (vsnprintf(buf, BUFFER_SIZE-1, fmt, ap)>BUFFER_SIZE-2) data/kbtin-1.0.20/utils.c:32: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(dup, s); data/kbtin-1.0.20/utils.c:52:5: [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, msg, ap); data/kbtin-1.0.20/variables.c:103:21: [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(result, v); data/kbtin-1.0.20/variables.c:124:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(value, _); data/kbtin-1.0.20/variables.c:126:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(value, ses->name); data/kbtin-1.0.20/variables.c:130:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(value, activesession->name); data/kbtin-1.0.20/variables.c:132:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(value, ses->logfile?ses->logname:""); data/kbtin-1.0.20/variables.c:166:21: [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(result, value); data/kbtin-1.0.20/variables.c:590: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(dest, beg); data/kbtin-1.0.20/variables.c:741: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(vars[0], p=temp); data/kbtin-1.0.20/variables.c:788:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. list+=sprintf(list, "%s", tab[i]); data/kbtin-1.0.20/variables.c:790:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. list+=sprintf(list, "{%s}", tab[i]); data/kbtin-1.0.20/variables.c:955:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. r+=sprintf(r, "%s", p); data/kbtin-1.0.20/variables.c:957:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. r+=sprintf(r, "{%s}", p); data/kbtin-1.0.20/variables.c:963:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. r+=sprintf(r, "%s", p); data/kbtin-1.0.20/variables.c:965:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. r+=sprintf(r, "{%s}", p); data/kbtin-1.0.20/variables.c:1003:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. r+=sprintf(r, "%s%s", del, temp); data/kbtin-1.0.20/variables.c:1022: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(last, K_ACTION_MAGIC); data/kbtin-1.0.20/variables.c:1047:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. outptr+=sprintf(outptr, "%s ", last); data/kbtin-1.0.20/variables.c:1054:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. outptr+=sprintf(outptr, "{%s} ", last); data/kbtin-1.0.20/variables.c:1056:17: [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(last, cur); data/kbtin-1.0.20/variables.c:1066:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. outptr+=sprintf(outptr, isatom(last)?"%s":"{%s}", last); data/kbtin-1.0.20/files.c:40:57: [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. result+=snprintf(result, BUFFER_SIZE, "%s", getenv("HOME")), arg++; data/kbtin-1.0.20/files.c:107:32: [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 (const char *cptr = getenv("HOME")) data/kbtin-1.0.20/help.c:51:46: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(filestring, "%s/KBtin_help", getenv("HOME")); data/kbtin-1.0.20/help.c:67:53: [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. tintin_eprintf(0, "# %s/KBtin_help%s", getenv("HOME"), data/kbtin-1.0.20/main.c:403:29: [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 ((home = getenv("HOME"))) data/kbtin-1.0.20/main.c:414:30: [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 ((home = getenv("HOME"))) data/kbtin-1.0.20/main.c:443:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand((getpid()*0x10001)^time0); data/kbtin-1.0.20/ssl.c:69: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. if (!(home=getenv("HOME"))) data/kbtin-1.0.20/ssl.c:110: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. if (!(home=getenv("HOME"))) data/kbtin-1.0.20/user_tty.c:1582: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. xterm=getenv("DISPLAY")&&(getenv("WINDOWID")||getenv("KONSOLE_DCOP_SESSION")); data/kbtin-1.0.20/user_tty.c:1582:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. xterm=getenv("DISPLAY")&&(getenv("WINDOWID")||getenv("KONSOLE_DCOP_SESSION")); data/kbtin-1.0.20/user_tty.c:1582:51: [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. xterm=getenv("DISPLAY")&&(getenv("WINDOWID")||getenv("KONSOLE_DCOP_SESSION")); data/kbtin-1.0.20/user_tty.c:1585:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. putty=(term=getenv("TERM"))&&!strncasecmp(term, "screen", 6); data/kbtin-1.0.20/variables.c:147:27: [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. v=getenv("HOME"); data/kbtin-1.0.20/action.c:20:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *var_ptr[10]; data/kbtin-1.0.20/action.c:85: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:86: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 pr[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:126: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:127: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 pr[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:167: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:214: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:262: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 arg[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:313:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, arg, numands + 1); data/kbtin-1.0.20/action.c:351:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, arg, numands); data/kbtin-1.0.20/action.c:404: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. char buffer[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:441: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. char buffer[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:465: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 left[BUFFER_SIZE], line[BUFFER_SIZE], right[BUFFER_SIZE], data/kbtin-1.0.20/action.c:517: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 left[BUFFER_SIZE], line[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:555:13: [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((*vars)[i], var_ptr[i], var_len[i]); data/kbtin-1.0.20/action.c:570: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 result[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:655: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 line[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:666: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 line[BUFFER_SIZE]; data/kbtin-1.0.20/alias.c:69: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 left[BUFFER_SIZE], right[BUFFER_SIZE], *ch; data/kbtin-1.0.20/alias.c:100: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/antisub.c:20: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/antisub.c:45: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/bind.c:111: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/bind.c:139: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 left[BUFFER_SIZE], result[BUFFER_SIZE]; data/kbtin-1.0.20/chinese.c:10: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 result[BUFFER_SIZE]; data/kbtin-1.0.20/colors.c:12: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 *MUDcolors[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; data/kbtin-1.0.20/colors.c:85:16: [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. return sprintf(txt, "~-1~"); data/kbtin-1.0.20/colors.c:87:16: [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. return sprintf(txt, "~%d~", c); data/kbtin-1.0.20/colors.c:89:16: [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. return sprintf(txt, "~%d:%d~", c&0xf, (c&0x70)>>4); data/kbtin-1.0.20/colors.c:90:12: [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. return sprintf(txt, "~%d:%d:%d~", c&0xf, (c&0x70)>>4, c>>7); data/kbtin-1.0.20/colors.c:157: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 OUT[BUFFER_SIZE*20], *out, *back, *TXT=txt; data/kbtin-1.0.20/colors.c:393: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[BUFFER_SIZE], *txt=buf; data/kbtin-1.0.20/colors.c:429: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 cc[BUFFER_SIZE][16], buf[BUFFER_SIZE]; data/kbtin-1.0.20/events.c:22: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/events.c:66: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 left[BUFFER_SIZE], right[BUFFER_SIZE], temp[BUFFER_SIZE], *cptr; data/kbtin-1.0.20/events.c:145: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 temp[BUFFER_SIZE], left[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:44: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 name[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:50:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(name, arg+1, p-arg-1); data/kbtin-1.0.20/files.c:67: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 lstr[BUFFER_SIZE*8]; data/kbtin-1.0.20/files.c:75: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 lstr[BUFFER_SIZE*8], buf[BUFFER_SIZE*4]; data/kbtin-1.0.20/files.c:93:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:105:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(myfile = fopen("tab.txt", "r"))) data/kbtin-1.0.20/files.c:110:22: [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). myfile = fopen(buffer, "r"); data/kbtin-1.0.20/files.c:153: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 file[BUFFER_SIZE], temp[BUFFER_SIZE], lstr[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:174:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], text[BUFFER_SIZE], temp[BUFFER_SIZE], lfname[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:185: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). if ((fh = fopen(lfname, "a"))) data/kbtin-1.0.20/files.c:218: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[BUFFER_SIZE*2], lbuf[BUFFER_SIZE*2]; data/kbtin-1.0.20/files.c:251: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 ubuf[BUFFER_SIZE*2], lbuf[BUFFER_SIZE*2]; data/kbtin-1.0.20/files.c:285: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 text[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:306: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 text[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:321:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], lfname[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:346:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f=fopen(lfname, "a"))) data/kbtin-1.0.20/files.c:356:16: [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 ((f=fopen(lfname, "w"))) data/kbtin-1.0.20/files.c:376: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). int fd=open(lfname, O_WRONLY|O_BINARY|O_CREAT|O_TRUNC, 0666); data/kbtin-1.0.20/files.c:392: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). else if ((f = fopen(lfname, "w"))) data/kbtin-1.0.20/files.c:408:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], temp[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:439:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], temp[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:483:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], temp[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:522: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[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:540: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 line[BUFFER_SIZE], buffer[BUFFER_SIZE], lstr[BUFFER_SIZE], *cptr, *eptr; data/kbtin-1.0.20/files.c:654:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFFER_SIZE], fname[BUFFER_SIZE], lfname[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:665:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(myfile = fopen(lfname, "r"))) data/kbtin-1.0.20/files.c:677:37: [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(num, "%d", var); \ data/kbtin-1.0.20/files.c:688:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFFER_SIZE*4], num[32], fname[BUFFER_SIZE], lfname[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:701:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(myfile = fopen(lfname, "w"))) data/kbtin-1.0.20/files.c:858:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFFER_SIZE*4], *val, num[32], fname[BUFFER_SIZE], lfname[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:877:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(myfile = fopen(lfname, "w"))) data/kbtin-1.0.20/files.c:1057:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFFER_SIZE], filename[BUFFER_SIZE], *cptr, lfname[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:1071:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(myfile = fopen(lfname, "r"))) data/kbtin-1.0.20/files.c:1099: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/files.c:1123: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 what[BUFFER_SIZE], *cset; data/kbtin-1.0.20/files.c:1149:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ses->c_log, &nc, sizeof(nc)); data/kbtin-1.0.20/glob.c:67: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 *a, *b, *pat, m1[BUFFER_SIZE], m2[BUFFER_SIZE]; data/kbtin-1.0.20/glob.c:186: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(mbl, txt, m-txt); data/kbtin-1.0.20/globals.c:27: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 *history[HISTORY_SIZE]; data/kbtin-1.0.20/globals.c:32: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 status[BUFFER_SIZE]; data/kbtin-1.0.20/help.c:15: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 sysfile[BUFFER_SIZE+8]; data/kbtin-1.0.20/help.c:19:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f=open(sysfile, O_RDONLY|O_BINARY))==-1) data/kbtin-1.0.20/help.c:23:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return (FILE *) fopen(filestring, "r"); data/kbtin-1.0.20/help.c:30: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 text[BUFFER_SIZE], line[BUFFER_SIZE], filestring[BUFFER_SIZE]; data/kbtin-1.0.20/highlight.c:58: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 tmp[BUFFER_SIZE]; data/kbtin-1.0.20/highlight.c:67: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(tmp, "~%.*s~", (int)(sl-hig), hig); data/kbtin-1.0.20/highlight.c:101: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/highlight.c:104: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 *pright, *tmp1, *tmp2, tmp3[BUFFER_SIZE]; data/kbtin-1.0.20/highlight.c:131:13: [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(tmp3, tmp1, tmp2 - tmp1); data/kbtin-1.0.20/highlight.c:177:13: [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(tmp1, "or 0..15:0..7:0..1"); data/kbtin-1.0.20/highlight.c:191: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 left[BUFFER_SIZE], result[BUFFER_SIZE]; data/kbtin-1.0.20/highlight.c:215: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 text[BUFFER_SIZE]; data/kbtin-1.0.20/history.c:29: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 temp[BUFFER_SIZE]; data/kbtin-1.0.20/history.c:41:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int i = atoi(cptr + 1); data/kbtin-1.0.20/hooks.c:28: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/hooks.c:68: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/hooks.c:122: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 buffer[BUFFER_SIZE]; data/kbtin-1.0.20/hooks.c:137: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 temp[BUFFER_SIZE]; data/kbtin-1.0.20/hooks.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(temp, "%cif {1==%clistlength {$SESSIONS}} %cend", data/kbtin-1.0.20/ivars.c:24: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 left[BUFFER_SIZE], right[BUFFER_SIZE], temp[BUFFER_SIZE]; data/kbtin-1.0.20/ivars.c:35:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%d", i); data/kbtin-1.0.20/ivars.c:44: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/ivars.c:78: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 command[BUFFER_SIZE], *ptr; data/kbtin-1.0.20/ivars.c:168: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 temp[BUFFER_SIZE]; data/kbtin-1.0.20/ivars.c:169: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:46: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 prev_command[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:351: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 temp[BUFFER_SIZE], sname[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:352: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 ustr[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:392:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f=fopen(opt->right, "r"))) data/kbtin-1.0.20/main.c:410:13: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(temp, "/.tintinrc"); data/kbtin-1.0.20/main.c:412:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f=fopen(temp, "r"))) data/kbtin-1.0.20/main.c:417:17: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(temp, "/.tintinrc"); data/kbtin-1.0.20/main.c:419: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 ((f=fopen(temp, "r"))) data/kbtin-1.0.20/main.c:523: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 kbdbuf[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:566: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 buf[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:569:13: [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, "#NEW SCREEN SIZE: %dx%d.", COLS, LINES); data/kbtin-1.0.20/main.c:683:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFFER_SIZE], linebuffer[BUFFER_SIZE], *cpsource, *cpdest; data/kbtin-1.0.20/main.c:684: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 temp[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:790: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 ubuf[BUFFER_SIZE]; data/kbtin-1.0.20/main.c:905: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 out[BUFFER_SIZE], *optr; data/kbtin-1.0.20/main.c:921:19: [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. optr+=sprintf(optr, "~:~"); data/kbtin-1.0.20/main.c:926:15: [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. optr+=sprintf(optr, "~%d~\n", c); data/kbtin-1.0.20/misc.c:59: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 tmp[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:113: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 temp1[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:133: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 chdesc[BUFFER_SIZE], outbuf[BUFFER_SIZE], *ep, *outp=outbuf; data/kbtin-1.0.20/misc.c:236: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 what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:261: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 what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:410: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[BUFFER_SIZE], *tmp; data/kbtin-1.0.20/misc.c:473: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 what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:483: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:506:13: [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(vars[0], "%d", counter); data/kbtin-1.0.20/misc.c:549: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 offon[2][20]; data/kbtin-1.0.20/misc.c:550: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 type[BUFFER_SIZE], onoff[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:552: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(offon[0], "OFF."); data/kbtin-1.0.20/misc.c:553: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(offon[1], "ON."); data/kbtin-1.0.20/misc.c:622: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 what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:655: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 what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:680: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[BUFFER_SIZE], ustr[BUFFER_SIZE], what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:719: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 cmd[BUFFER_SIZE*4], what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:779: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 line[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:780:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* news=fopen( NEWS_FILE , "r"); data/kbtin-1.0.20/misc.c:783: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). news=fopen( DATA_PATH "/" NEWS_FILE , "r"); data/kbtin-1.0.20/misc.c:813: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 tbuf[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:857: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 *newcomp, buff[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:899: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 s_buff[BUFFER_SIZE], c_buff[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:946:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFFER_SIZE], *bptr; data/kbtin-1.0.20/misc.c:994:19: [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. bptr+=sprintf(bptr, "Terminal size: %dx%d", COLS, LINES); data/kbtin-1.0.20/misc.c:996:19: [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. bptr+=sprintf(bptr, "Terminal size: unknown"); data/kbtin-1.0.20/misc.c:1000:19: [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. bptr+=sprintf(bptr, ", retain: %d", retain); data/kbtin-1.0.20/misc.c:1074: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:1092: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:1110: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 left[BUFFER_SIZE], right[BUFFER_SIZE], *b; data/kbtin-1.0.20/misc.c:1138: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 left[BUFFER_SIZE], right[BUFFER_SIZE], *a; data/kbtin-1.0.20/misc.c:1196: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 sec[BUFFER_SIZE], usec[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:1220:13: [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(right, "%d", (int)tv2.tv_sec); data/kbtin-1.0.20/misc.c:1225:13: [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(right, "%d", (int)tv2.tv_usec); data/kbtin-1.0.20/misc.c:1238: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 what[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:1258:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ses->c_io, &nc, sizeof(nc)); data/kbtin-1.0.20/misc.c:1271: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 destvar[BUFFER_SIZE], left[BUFFER_SIZE]; data/kbtin-1.0.20/misc.c:1273: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 res[BUFFER_SIZE], *r; data/kbtin-1.0.20/misc.c:1355: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 destvar[BUFFER_SIZE], left[BUFFER_SIZE], res[BUFFER_SIZE], *r; data/kbtin-1.0.20/misc.c:1370:16: [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. r+=sprintf(r, " %u", (unsigned int)*cptr); data/kbtin-1.0.20/misc.c:1393: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 destvar[BUFFER_SIZE], left[BUFFER_SIZE], res[BUFFER_SIZE], *r; data/kbtin-1.0.20/misc.c:1408:16: [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. r+=sprintf(r, " U+%04X", (unsigned int)*cptr); data/kbtin-1.0.20/misc.c:1430: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/net.c:45:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char msg[19]; data/kbtin-1.0.20/net.c:167:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)&sockaddr.sin_addr, hp->h_addr, sizeof(sockaddr.sin_addr)); data/kbtin-1.0.20/net.c:171:35: [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). sockaddr.sin_port = htons(atoi(port)); /* intepret port part */ data/kbtin-1.0.20/net.c:231: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 rstr[BUFFER_SIZE]; data/kbtin-1.0.20/net.c:261: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 *rp, rstr[BUFFER_SIZE]; data/kbtin-1.0.20/net.c:516: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(ses->mccp_buf, cpsrc, cplen); data/kbtin-1.0.20/parse.c:48: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 command[BUFFER_SIZE], arg[BUFFER_SIZE], result[BUFFER_SIZE], *al; data/kbtin-1.0.20/parse.c:234: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 sc[2]; data/kbtin-1.0.20/parse.c:285: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 tmp[BUFFER_SIZE]; data/kbtin-1.0.20/parse.c:304: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 *b, cmd[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/parse.c:338:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int i = atoi(command); data/kbtin-1.0.20/parse.c:363: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 cmd[BUFFER_SIZE]; data/kbtin-1.0.20/parse.c:574: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 tmp[BUFFER_SIZE]; data/kbtin-1.0.20/parse.c:634: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 outtext[BUFFER_SIZE]; data/kbtin-1.0.20/path.c:43: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 cmd[BUFFER_SIZE]; data/kbtin-1.0.20/path.c:54: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 alias[BUFFER_SIZE], result[BUFFER_SIZE], *r=result; data/kbtin-1.0.20/path.c:132: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 mypath[BUFFER_SIZE]; data/kbtin-1.0.20/path.c:134:20: [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. char *r=mypath+sprintf(mypath, "#Path: "); data/kbtin-1.0.20/path.c:142:22: [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. r=mypath+sprintf(mypath, "#Path: "); data/kbtin-1.0.20/path.c:156: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 *err, how[BUFFER_SIZE]; data/kbtin-1.0.20/path.c:192: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 command[BUFFER_SIZE]; data/kbtin-1.0.20/path.c:247: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/path.c:268: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/print.c:19: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 line[BUFFER_SIZE]; data/kbtin-1.0.20/print.c:36: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 line[BUFFER_SIZE]; data/kbtin-1.0.20/print.c:66: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[BUFFER_SIZE]; data/kbtin-1.0.20/print.c:83: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[BUFFER_SIZE]; data/kbtin-1.0.20/pty.c:67:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (0 > (filedes[1] = open(line, O_RDWR))) data/kbtin-1.0.20/pty.c:78: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 name[80]; data/kbtin-1.0.20/pty.c:84:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). master=open("/dev/ptmx", O_RDWR); data/kbtin-1.0.20/pty.c:103: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). slave=open(name, O_RDWR); data/kbtin-1.0.20/pty.c:126: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 PtyName[32], TtyName[32]; data/kbtin-1.0.20/pty.c:139:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((master = open(PtyName, O_RDWR | O_NOCTTY)) == -1) data/kbtin-1.0.20/pty.c:148:24: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((slave=open(TtyName, O_RDWR|O_NOCTTY))==-1) data/kbtin-1.0.20/regexp.c:33:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*vars)[i], line+pmatch[i].rm_so, data/kbtin-1.0.20/regexp.c:50: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 left[BUFFER_SIZE], line[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/regexp.c:98: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 left[BUFFER_SIZE], line[BUFFER_SIZE]; data/kbtin-1.0.20/routes.c:140: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 a[BUFFER_SIZE], b[BUFFER_SIZE], way[BUFFER_SIZE], dist[BUFFER_SIZE], cond[BUFFER_SIZE]; data/kbtin-1.0.20/routes.c:250: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 a[BUFFER_SIZE], b[BUFFER_SIZE]; data/kbtin-1.0.20/routes.c:297: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 A[BUFFER_SIZE], B[BUFFER_SIZE], tmp[BUFFER_SIZE], cond[BUFFER_SIZE]; data/kbtin-1.0.20/routes.c:300: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 *path[MAX_LOCATIONS], *locs[MAX_LOCATIONS]; data/kbtin-1.0.20/routes.c:399: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 A[BUFFER_SIZE], B[BUFFER_SIZE], data/kbtin-1.0.20/routes.c:401: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 left[BUFFER_SIZE], right[BUFFER_SIZE], tmp[BUFFER_SIZE], cond[BUFFER_SIZE]; data/kbtin-1.0.20/routes.c:404: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 path[BUFFER_SIZE], *pptr; data/kbtin-1.0.20/routes.c:459: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(tmp, "%d", d[b]); data/kbtin-1.0.20/run.c:24: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[BUFFER_SIZE], *bptr; data/kbtin-1.0.20/run.c:36:18: [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. bptr=buf+sprintf(buf, " ~3~[%x]~7~:", ta.c_cflag); data/kbtin-1.0.20/run.c:48:18: [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. bptr=buf+sprintf(buf, " ~3~[%x]~7~:", ta.c_iflag); data/kbtin-1.0.20/run.c:70:18: [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. bptr=buf+sprintf(buf, " ~3~[%x]~7~:", ta.c_oflag); data/kbtin-1.0.20/run.c:92:18: [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. bptr=buf+sprintf(buf, " ~3~[%x]~7~:", ta.c_lflag); data/kbtin-1.0.20/run.c:184: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. const char *argv[4]; data/kbtin-1.0.20/run.c:185: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 cmd[BUFFER_SIZE+5]; data/kbtin-1.0.20/run.c:226: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. const char *argv[4]; data/kbtin-1.0.20/run.c:227: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 cmd[BUFFER_SIZE+5]; data/kbtin-1.0.20/run.c:233:25: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofd=open("/dev/null", O_RDONLY); data/kbtin-1.0.20/run.c:244:25: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofd=open("/dev/null", O_WRONLY); data/kbtin-1.0.20/run.c:273: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 out[4*BUFFER_SIZE+1]; data/kbtin-1.0.20/session.c:65:8: [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. do sprintf(t, "%d", i++); while (session_exists(str)); data/kbtin-1.0.20/session.c:138: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 left[BUFFER_SIZE], right[BUFFER_SIZE], host[BUFFER_SIZE]; data/kbtin-1.0.20/session.c:209: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 left[BUFFER_SIZE], right[BUFFER_SIZE], ustr[BUFFER_SIZE]; data/kbtin-1.0.20/session.c:252: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[BUFFER_SIZE]; data/kbtin-1.0.20/session.c:371: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[BUFFER_SIZE+1]; data/kbtin-1.0.20/ssl.c:44:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], *fn; data/kbtin-1.0.20/ssl.c:79: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[BIGBUFSIZE]; data/kbtin-1.0.20/ssl.c:85: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 (!(f=fopen(buf, "r"))) data/kbtin-1.0.20/ssl.c:102:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], buf[BIGBUFSIZE]; data/kbtin-1.0.20/ssl.c:130: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 (!(f=fopen(fname, "w"))) data/kbtin-1.0.20/ssl.c:152: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 buf1[BIGBUFSIZE], buf2[BIGBUFSIZE]; data/kbtin-1.0.20/ssl.c:168:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[BUFFER_SIZE], buf2[BUFFER_SIZE], *bptr; data/kbtin-1.0.20/substitute.c:21: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/substitute.c:82: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 temp[BUFFER_SIZE]; data/kbtin-1.0.20/substitute.c:91:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(temp, "} {"EMPTY_LINE"}"); data/kbtin-1.0.20/substitute.c:100: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/substitute.c:141:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result+rlen, srch, len); \ data/kbtin-1.0.20/substitute.c:148: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 result[BUFFER_SIZE], tmp1[BUFFER_SIZE], tmp2[BUFFER_SIZE]; data/kbtin-1.0.20/substitute.c:168:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, line, rlen); data/kbtin-1.0.20/substitute.c:188:13: [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(line, result, rlen); data/kbtin-1.0.20/substitute.c:197: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 left[BUFFER_SIZE], temp[BUFFER_SIZE]; data/kbtin-1.0.20/telnet.c:47:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *will_names[4]={"WILL", "WONT", "DO", "DONT"}; data/kbtin-1.0.20/telnet.c:111:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 nego[128], *np; data/kbtin-1.0.20/telnet.c:127: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[BUFFER_SIZE], *b=buf; data/kbtin-1.0.20/telnet.c:130:15: [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. b=buf+sprintf(buf, "IAC SB NAWS "); data/kbtin-1.0.20/telnet.c:132:16: [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. b+=sprintf(b, "<%u> ", *np++); data/kbtin-1.0.20/telnet.c:133:12: [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. b+=sprintf(b, "IAC SE"); data/kbtin-1.0.20/telnet.c:141: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 nego[128]; data/kbtin-1.0.20/telnet.c:186:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 answer[3]; data/kbtin-1.0.20/telnet.c:187:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 nego[128], *np; data/kbtin-1.0.20/telnet.c:309: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 buf[BUFFER_SIZE], *b=buf; data/kbtin-1.0.20/telnet.c:312:19: [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. b=buf+sprintf(buf, "IAC SB "); data/kbtin-1.0.20/telnet.c:316:20: [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. b+=sprintf(b, "TERMINAL-TYPE "); data/kbtin-1.0.20/telnet.c:319:24: [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. b+=sprintf(b, "SEND "); data/kbtin-1.0.20/telnet.c:324:20: [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. b+=sprintf(b, "COMPRESS2 "); data/kbtin-1.0.20/telnet.c:328:20: [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. b+=sprintf(b, "<%u> ", *np++); data/kbtin-1.0.20/telnet.c:329:16: [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. b+=sprintf(b, "IAC SE"); data/kbtin-1.0.20/telnet.c:372: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 outtext[6*BUFFER_SIZE + 2], *out; data/kbtin-1.0.20/tests/ttyrec2ansi.c:9: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[BUFFER_SIZE]; data/kbtin-1.0.20/ticks.c:24: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[100]; data/kbtin-1.0.20/ticks.c:28: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, "THERE'S NOW %d SECONDS TO NEXT TICK.", to_tick); data/kbtin-1.0.20/ticks.c:72: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 left[BUFFER_SIZE], *err; data/kbtin-1.0.20/ticks.c:103: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 left[BUFFER_SIZE], *err; data/kbtin-1.0.20/tintin.h:221:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(d, s, n) bcopy ((s), (d), (n)) data/kbtin-1.0.20/tintin.h:221:26: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(d, s, n) bcopy ((s), (d), (n)) data/kbtin-1.0.20/tintin.h:222:27: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memmove(d, s, n) bcopy ((s), (d), (n)) data/kbtin-1.0.20/tintin.h:311: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 *locations[MAX_LOCATIONS]; data/kbtin-1.0.20/tintin.h:318: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 last_line[BUFFER_SIZE], telnet_buf[BUFFER_SIZE]; data/kbtin-1.0.20/tintin.h:325: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 *hooks[NHOOKS]; data/kbtin-1.0.20/tintin.h:335: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 mccp_buf[INPUT_CHUNK]; data/kbtin-1.0.20/tintin.h:343: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. typedef char pvars_t[10][BUFFER_SIZE]; data/kbtin-1.0.20/unicode.c:168:5: [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 u[2]; data/kbtin-1.0.20/unicode.c:259:5: [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[BUFFER_SIZE]; data/kbtin-1.0.20/unicode.c:314:5: [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 wbuf[BUFFER_SIZE], *wptr; data/kbtin-1.0.20/user.c:14: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 done_input[BUFFER_SIZE]; data/kbtin-1.0.20/user_pipe.c:23: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[BUFFER_SIZE], *b=buf; data/kbtin-1.0.20/user_tty.c:19: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 out_line[BUFFER_SIZE], b_draft[BUFFER_SIZE]; data/kbtin-1.0.20/user_tty.c:29: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 *b_output[CONSOLE_LENGTH]; data/kbtin-1.0.20/user_tty.c:40: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 term_buf[BUFFER_SIZE*8], *tbuf; data/kbtin-1.0.20/user_tty.c:170: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 txt[BUFFER_SIZE]; data/kbtin-1.0.20/user_tty.c:171: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(txt, "b_first=%d, b_current=%d, b_last=%d, b_bottom=%d, b_screenb=%d", data/kbtin-1.0.20/user_tty.c:175: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(txt, "k_len=%d, strlen(k_input)=%d, k_pos=%d, k_scrl=%d", data/kbtin-1.0.20/user_tty.c:185: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. tbuf+=sprintf(tbuf, "\033[%d;%df", scr_len+1, scr_curs+1); data/kbtin-1.0.20/user_tty.c:201: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. tbuf+=sprintf(tbuf, "\033[%d;1f\033[0;37;4%dm", scr_len+1, INPUT_COLOR); data/kbtin-1.0.20/user_tty.c:207:15: [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. tbuf+=sprintf(tbuf, "\033[1m<\033[0;4%dm", INPUT_COLOR); data/kbtin-1.0.20/user_tty.c:209:15: [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. tbuf+=sprintf(tbuf, "\033[30;1m"); data/kbtin-1.0.20/user_tty.c:234:19: [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. tbuf+=sprintf(tbuf, "\033[4%dm", MARGIN_COLOR); data/kbtin-1.0.20/user_tty.c:244:19: [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. tbuf+=sprintf(tbuf, "\033[4%dm", INPUT_COLOR); data/kbtin-1.0.20/user_tty.c:257:15: [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. tbuf+=sprintf(tbuf, "\033[1m>"); data/kbtin-1.0.20/user_tty.c:259:15: [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. tbuf+=sprintf(tbuf, "\033[0K"); data/kbtin-1.0.20/user_tty.c:278: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. tbuf+=sprintf(tbuf, "\033[%d;1f\033[0;3%d;4%dm\033[2K\r", LINES, data/kbtin-1.0.20/user_tty.c:341: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. tbuf+=sprintf(tbuf, "\033[%d;%df\033[0;37;40m\033[1J", scr_len, COLS); data/kbtin-1.0.20/user_tty.c:346:19: [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. tbuf+=sprintf(tbuf, "\033[%d;1f", scr_len+y-b_to); data/kbtin-1.0.20/user_tty.c:352:23: [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. tbuf+=sprintf(tbuf, "\033[2K"); data/kbtin-1.0.20/user_tty.c:355: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. tbuf+=sprintf(tbuf, "\0337"); data/kbtin-1.0.20/user_tty.c:359:15: [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. tbuf+=sprintf(tbuf, "\033[%d;1f\033[0;1;37;4%dm\033[2K\033[?25l", data/kbtin-1.0.20/user_tty.c:365:15: [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. tbuf+=sprintf(tbuf, "\033[?25h"); data/kbtin-1.0.20/user_tty.c:418:15: [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. tbuf+=sprintf(tbuf, "\033[0;37;40m\r\n\033[2K"); data/kbtin-1.0.20/user_tty.c:443:15: [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. tbuf+=sprintf(tbuf, "\033[0;37;40m\r\n\033[2K"); data/kbtin-1.0.20/user_tty.c:446: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. tbuf+=sprintf(tbuf, "\033[f"); data/kbtin-1.0.20/user_tty.c:451:5: [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 u[2]; data/kbtin-1.0.20/user_tty.c:472:19: [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. tbuf+=sprintf(tbuf, "\033[0;37;40m\r\n\033[2K"); data/kbtin-1.0.20/user_tty.c:495: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. tbuf+=sprintf(tbuf, "\0337"); data/kbtin-1.0.20/user_tty.c:511:15: [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. tbuf+=sprintf(tbuf, "\0338\033[0m\033[2K"); data/kbtin-1.0.20/user_tty.c:515:19: [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. tbuf+=sprintf(tbuf, "\033[A\033[2K"); data/kbtin-1.0.20/user_tty.c:568:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(b_draft, "\xe2\x96\xa0"); // U+25A0 BLACK SQUARE data/kbtin-1.0.20/user_tty.c:646: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(buf, k_input+a2, (b2+1-a2)*WCL); data/kbtin-1.0.20/user_tty.c:647: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(buf+b2+1-a2, k_input+b1+1, (a2-b1-1)*WCL); data/kbtin-1.0.20/user_tty.c:648: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(buf+b2-b1, k_input+a1, (b1+1-a1)*WCL); data/kbtin-1.0.20/user_tty.c:649: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(k_input+a1, buf, (b2+1-a1)*WCL); data/kbtin-1.0.20/user_tty.c:683: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 txt[16]; data/kbtin-1.0.20/user_tty.c:902:21: [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(txt, "ESC[%i~", val[0]); data/kbtin-1.0.20/user_tty.c:944:13: [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(txt, "Alt-Backspace"); data/kbtin-1.0.20/user_tty.c:948:13: [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(txt, "Alt-Space"); data/kbtin-1.0.20/user_tty.c:950:13: [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(txt, "Alt-Esc"); data/kbtin-1.0.20/user_tty.c:952:13: [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(txt, "Alt-Enter"); data/kbtin-1.0.20/user_tty.c:954:13: [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(txt, "Alt-Tab"); data/kbtin-1.0.20/user_tty.c:1109:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(yank_buffer, k_input+k_pos, i*WCL); data/kbtin-1.0.20/user_tty.c:1146:15: [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. tbuf+=sprintf(tbuf, "\0335n"); data/kbtin-1.0.20/user_tty.c:1180:19: [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. tbuf+=sprintf(tbuf, "\033[%d;1f\033[0;37;4%dm\033[2K", scr_len+1, INPUT_COLOR); data/kbtin-1.0.20/user_tty.c:1183:23: [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. tbuf+=sprintf(tbuf, "\033[%d;%df\033[0;37;4%dm", data/kbtin-1.0.20/user_tty.c:1191:23: [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. tbuf+=sprintf(tbuf, "\033[1;37;4%dm\033[%d;1f", INPUT_COLOR, scr_len+1); data/kbtin-1.0.20/user_tty.c:1405:27: [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. tbuf+=sprintf(tbuf, "\033[0;37;4%dm", data/kbtin-1.0.20/user_tty.c:1437: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 *src[CONSOLE_LENGTH]; data/kbtin-1.0.20/user_tty.c:1439: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 line[BUFFER_SIZE], *lp; data/kbtin-1.0.20/user_tty.c:1450:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(src, b_output+(b_first%CONSOLE_LENGTH), src_lines*sizeof(char*)); data/kbtin-1.0.20/user_tty.c:1453:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(src, b_output+(b_first%CONSOLE_LENGTH), (CONSOLE_LENGTH-b_first%CONSOLE_LENGTH)*sizeof(char*)); data/kbtin-1.0.20/user_tty.c:1454:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(src+CONSOLE_LENGTH-b_first%CONSOLE_LENGTH, b_output, (b_bottom%CONSOLE_LENGTH)*sizeof(char*)); data/kbtin-1.0.20/user_tty.c:1510: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. tbuf+=sprintf(tbuf, "\033[0;37;40m\033[2J\033[0;37;40m\033[1;%dr\0337", scr_len); data/kbtin-1.0.20/user_tty.c:1511: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. tbuf+=sprintf(tbuf, "\033[%d;1f\033[0;37;4%dm", scr_len+1, INPUT_COLOR); data/kbtin-1.0.20/user_tty.c:1513:15: [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. tbuf+=sprintf(tbuf, "\033[2K"); data/kbtin-1.0.20/user_tty.c:1518:15: [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. tbuf+=sprintf(tbuf, "\033[%d;f\033[37;4%dm\033[2K", LINES, STATUS_COLOR); data/kbtin-1.0.20/user_tty.c:1528:15: [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. tbuf+=sprintf(tbuf, "\033=\033[?1051l\033[?1052l\033[?1060l\033[?1061h"); data/kbtin-1.0.20/user_tty.c:1530:15: [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. tbuf+=sprintf(tbuf, "\033>\033[?1051l\033[?1052l\033[?1060l\033[?1061l"); data/kbtin-1.0.20/user_tty.c:1589:19: [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. tbuf=term_buf+sprintf(term_buf, "\033[?7l"); data/kbtin-1.0.20/user_tty.c:1624: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. tbuf+=sprintf(tbuf, "\033[1;1f\0337"); data/kbtin-1.0.20/user_tty.c:1625: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. tbuf+=sprintf(tbuf, "\033[>c"); /* query the terminal type */ data/kbtin-1.0.20/user_tty.c:1632: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(done_input+COLS, "~7~\n"); data/kbtin-1.0.20/user_tty.c:1640: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. tbuf+=sprintf(tbuf, "\033[1;%dr\033[%d;1f\033[?25h\033[?7h\033[0;37;40m", LINES, LINES); data/kbtin-1.0.20/user_tty.c:1650: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. tbuf+=sprintf(tbuf, "\033[1;%dr\033[%d;1f\033[?25h\033[?7h\033[0;37;40m", LINES, LINES); data/kbtin-1.0.20/user_tty.c:1659:19: [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. tbuf=term_buf+sprintf(term_buf, "\033[?7l"); data/kbtin-1.0.20/user_tty.c:1676: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 lstr[BUFFER_SIZE], ustr[BUFFER_SIZE], *s=ustr; data/kbtin-1.0.20/user_tty.c:1723: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[BUFFER_SIZE]; data/kbtin-1.0.20/user_tty.c:1732: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. tbuf+=sprintf(tbuf, "\033]0;"); data/kbtin-1.0.20/variables.c:48: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 varname[BUFFER_SIZE], value[BUFFER_SIZE], *v; data/kbtin-1.0.20/variables.c:72:21: [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(varname, arg+counter, varlen); data/kbtin-1.0.20/variables.c:111:25: [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(value, "%d", timetilltick(ses)); data/kbtin-1.0.20/variables.c:113:25: [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(value, "%d", LINES); data/kbtin-1.0.20/variables.c:115:25: [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(value, "%d", COLS); data/kbtin-1.0.20/variables.c:119:25: [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(value, "%ld", (long int)(time(0)-ses->idle_since)); data/kbtin-1.0.20/variables.c:121:25: [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(value, "%ld", (long int)(time(0)-ses->server_idle_since)); data/kbtin-1.0.20/variables.c:134:25: [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(value, "%d", rand()); data/kbtin-1.0.20/variables.c:136:25: [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(value, "%ld", (long int)time0); data/kbtin-1.0.20/variables.c:138:25: [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(value, "%ld", (long int)time(0)); data/kbtin-1.0.20/variables.c:143:25: [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(value, "%ld", (long int)((tv.tv_sec-time0)*1000+(tv.tv_usec-utime0)/1000)); data/kbtin-1.0.20/variables.c:175:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, arg, counter + varlen); data/kbtin-1.0.20/variables.c:209: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:229: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:250: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 left[BUFFER_SIZE], list[BUFFER_SIZE], data/kbtin-1.0.20/variables.c:265:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%d", i); data/kbtin-1.0.20/variables.c:274: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 list[BUFFER_SIZE], temp[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:289: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 temp[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:309: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 left[BUFFER_SIZE], list[BUFFER_SIZE], item[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:317: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(item, "%d", find_item(item, list)); data/kbtin-1.0.20/variables.c:326: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 list[BUFFER_SIZE], item[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:347: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 destvar[BUFFER_SIZE], itemnrtxt[BUFFER_SIZE], data/kbtin-1.0.20/variables.c:420: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 left[BUFFER_SIZE], right[BUFFER_SIZE], temp[8]; data/kbtin-1.0.20/variables.c:427:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%d", isatom(right)); data/kbtin-1.0.20/variables.c:437: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 list[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:481: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 temp[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:636: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 headvar[BUFFER_SIZE], tailvar[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:637: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 list[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:638: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 headlengthtxt[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:640: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 head[BUFFER_SIZE], tail[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:684: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 left[BUFFER_SIZE], list[BUFFER_SIZE], item[BUFFER_SIZE], data/kbtin-1.0.20/variables.c:724: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 temp[BUFFER_SIZE], left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:766: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 *list, temp[BUFFER_SIZE], left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:767: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 *tab[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:801: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:821: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:841: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:862: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:869: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(right, "%d", FLATlen(right)); data/kbtin-1.0.20/variables.c:878: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 left[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:916: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 destvar[BUFFER_SIZE], strvar[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:937: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 left[BUFFER_SIZE], del[BUFFER_SIZE], right[BUFFER_SIZE], data/kbtin-1.0.20/variables.c:981: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 left[BUFFER_SIZE], del[BUFFER_SIZE], right[BUFFER_SIZE], data/kbtin-1.0.20/variables.c:1014: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 left[BUFFER_SIZE], list[BUFFER_SIZE], data/kbtin-1.0.20/variables.c:1045:33: [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. outptr+=sprintf(outptr, "%d", i); data/kbtin-1.0.20/variables.c:1052:33: [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. outptr+=sprintf(outptr, "%d", i); data/kbtin-1.0.20/variables.c:1064:17: [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. outptr+=sprintf(outptr, "%d", i); data/kbtin-1.0.20/variables.c:1076: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 left[BUFFER_SIZE], list[BUFFER_SIZE], data/kbtin-1.0.20/variables.c:1118: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 left[BUFFER_SIZE], right[BUFFER_SIZE], dummy; data/kbtin-1.0.20/variables.c:1136: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(right, "%d", number); data/kbtin-1.0.20/variables.c:1145: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 right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1198: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 destvar[BUFFER_SIZE], lengthstr[BUFFER_SIZE], astr[BUFFER_SIZE], *aptr; data/kbtin-1.0.20/variables.c:1233: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 destvar[BUFFER_SIZE], astr[BUFFER_SIZE], lengthstr[BUFFER_SIZE], *aptr; data/kbtin-1.0.20/variables.c:1323: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 left[BUFFER_SIZE], arg2[BUFFER_SIZE], *ct, *p; data/kbtin-1.0.20/variables.c:1356: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 left[BUFFER_SIZE], ct[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1365: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(ct, "%d", t); data/kbtin-1.0.20/variables.c:1368: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(ct, "%d", (int)time(0)); data/kbtin-1.0.20/variables.c:1380: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 left[BUFFER_SIZE], ct[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1391: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(ct, "%ld", (long)t); data/kbtin-1.0.20/variables.c:1396: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(ct, "%02d %02d %02d %02d %02d %04d %d %d %d", data/kbtin-1.0.20/variables.c:1411: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 left[BUFFER_SIZE], ct[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1422: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(ct, "%ld", (long)t); data/kbtin-1.0.20/variables.c:1427: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(ct, "%02d %02d %02d %02d %02d %04d %d %d %d", data/kbtin-1.0.20/variables.c:1443: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 left[BUFFER_SIZE], mid[BUFFER_SIZE], right[BUFFER_SIZE], *p; data/kbtin-1.0.20/variables.c:1500: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 left[BUFFER_SIZE], right[BUFFER_SIZE], cmd[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1534: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1557: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 left[BUFFER_SIZE], cmd[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1590: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/variables.c:1607: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 left[BUFFER_SIZE], right[BUFFER_SIZE]; data/kbtin-1.0.20/action.c:36:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nptr->left=MALLOC(strlen(K_ACTION_MAGIC)+1); data/kbtin-1.0.20/action.c:95: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(pr, "5"); /* defaults priority to 5 if no value given */ data/kbtin-1.0.20/action.c:136: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(pr, "5"); /* defaults priority to 5 if no value given */ data/kbtin-1.0.20/action.c:189: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). ln->left=MALLOC(strlen(K_ACTION_MAGIC)+1); data/kbtin-1.0.20/action.c:236: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). ln->left=MALLOC(strlen(K_ACTION_MAGIC)+1); data/kbtin-1.0.20/action.c:278: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). int valuelen, len=strlen(arg); data/kbtin-1.0.20/action.c:295:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). valuelen=strlen((*pvars)[n]); data/kbtin-1.0.20/action.c:327:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). valuelen=strlen((*pvars)[n]); data/kbtin-1.0.20/action.c:618:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). var_len[*(tptr + 1) - 48] = strlen(lptr); data/kbtin-1.0.20/colors.c:417: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). txt+=strlen(MUDcolors[c&0xf]); data/kbtin-1.0.20/files.c:129: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 (!(cptr = (char *)(malloc(strlen(buffer) + 1)))) data/kbtin-1.0.20/files.c:230:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len+=strlen(lbuf+len); data/kbtin-1.0.20/files.c:257: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). n=strlen(lbuf); data/kbtin-1.0.20/files.c:366: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(fname); data/kbtin-1.0.20/files.c:588: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 (ignore_lines || (strlen(cptr)+strlen(buffer) >= BUFFER_SIZE/2)) data/kbtin-1.0.20/files.c:588:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (ignore_lines || (strlen(cptr)+strlen(buffer) >= BUFFER_SIZE/2)) data/kbtin-1.0.20/files.c:602:21: [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(buffer, " "); data/kbtin-1.0.20/files.c:1045: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). if (pr && strlen(pr)) data/kbtin-1.0.20/files.c:1047:5: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(result, "\n"); data/kbtin-1.0.20/glob.c:23: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). sp += strlen(sp); data/kbtin-1.0.20/glob.c:77: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). *to=strlen(text)-1; data/kbtin-1.0.20/glob.c:79: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). *to=*from+strlen(fastener)-1; data/kbtin-1.0.20/glob.c:105: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). *to=*from+strlen(pattern)-1; data/kbtin-1.0.20/glob.c:124:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i=strlen(pat); data/kbtin-1.0.20/glob.c:127: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). *to=strlen(text)-1; data/kbtin-1.0.20/glob.c:138:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i=strlen(txt); data/kbtin-1.0.20/glob.c:153: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). *to=strlen(text)-(a-txt)-1; data/kbtin-1.0.20/glob.c:154: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). txt=a+strlen(pat); data/kbtin-1.0.20/help.c:90: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). *(line + strlen(line) - 1) = '\0'; data/kbtin-1.0.20/help.c:107:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *(line + strlen(line) - 1) = '\0'; data/kbtin-1.0.20/llist.c:174:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newnode->left = (char *)MALLOC(strlen(ltext) + 1); data/kbtin-1.0.20/llist.c:175:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newnode->right = (char *)MALLOC(strlen(rtext) + 1); data/kbtin-1.0.20/llist.c:176: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). newnode->pr = prtext? (char *)MALLOC(strlen(prtext) + 1) : 0; data/kbtin-1.0.20/llist.c:219: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). ln=strlen(ltext); data/kbtin-1.0.20/llist.c:222: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). lo=strlen(nptr->left); data/kbtin-1.0.20/main.c:584:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result=read(0, kbdbuf+inbuf, BUFFER_SIZE-inbuf); data/kbtin-1.0.20/main.c:849:17: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(strchr(line, 0), "\n"); data/kbtin-1.0.20/malloc.h:10:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define SFREE(x) {if (x) g_slice_free1(strlen(x)+1, x);} data/kbtin-1.0.20/misc.c:498:17: [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(vars[counter], ""); data/kbtin-1.0.20/misc.c:861:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!arg || !strlen(arg)) data/kbtin-1.0.20/misc.c:868:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(newcomp = (char *)(malloc(strlen(buff) + 1)))) data/kbtin-1.0.20/misc.c:903:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!arg || !strlen(arg)) data/kbtin-1.0.20/net.c:325:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(ses->socket, buffer, len); data/kbtin-1.0.20/net.c:357:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). didget=read(ses->socket, buffer, INPUT_CHUNK); data/kbtin-1.0.20/parse.c:145: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 (strlen(arg)+1+strlen((*pvars)[0]) > BUFFER_SIZE-10) data/kbtin-1.0.20/parse.c:145: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 (strlen(arg)+1+strlen((*pvars)[0]) > BUFFER_SIZE-10) data/kbtin-1.0.20/parse.c:154:21: [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(arg, " "); data/kbtin-1.0.20/parse.c:238: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(sc, "x"); data/kbtin-1.0.20/parse.c:371: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 (int n=strlen(cmd); n; n--) data/kbtin-1.0.20/path.c:70:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int dirlen = strlen(ln->left); data/kbtin-1.0.20/path.c:108: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). dirlen = strlen(ln->left); data/kbtin-1.0.20/path.c:137:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int dirlen = strlen(ln->left); data/kbtin-1.0.20/print.c:75: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(buf+n, "\n"); data/kbtin-1.0.20/print.c:94: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(buf+n, "\n"); data/kbtin-1.0.20/routes.c:160:13: [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(b, "*"); data/kbtin-1.0.20/session.c:118: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). if (strlen(left) > MAX_SESNAME_LENGTH) data/kbtin-1.0.20/substitute.c:30: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(left, "*"); data/kbtin-1.0.20/substitute.c:169:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len=strlen(tmp2); data/kbtin-1.0.20/substitute.c:179: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). len=strlen(tmp2); data/kbtin-1.0.20/substitute.c:184: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). len=strlen(l); data/kbtin-1.0.20/tests/ttyrec2ansi.c:14:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(0, &th, 12)!=12) data/kbtin-1.0.20/tests/ttyrec2ansi.c:20:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r=read(0, buf, s))<=0) data/kbtin-1.0.20/unicode.c:230: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/kbtin-1.0.20/unicode.c:397: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). il=strlen(inbuf); data/kbtin-1.0.20/unicode.h:5: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). #define WClen wcslen data/kbtin-1.0.20/user_tty.c:174: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). COLS-(int)strlen(txt)-1, txt); data/kbtin-1.0.20/user_tty.c:178: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). COLS-(int)strlen(txt)-1, txt); data/kbtin-1.0.20/user_tty.c:570:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((o_draftlen=strlen(b_draft))) data/kbtin-1.0.20/utils.c:17:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return !strncmp(s2, s1, strlen(s1)); data/kbtin-1.0.20/utils.c:30: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 (!(dup = MALLOC(strlen(s) + 1))) data/kbtin-1.0.20/utils.c:62: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). return strlen(src); data/kbtin-1.0.20/variables.c:51:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len=strlen(arg); data/kbtin-1.0.20/variables.c:80: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). varlen=strlen(varname); data/kbtin-1.0.20/variables.c:91: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). valuelen = strlen(v); data/kbtin-1.0.20/variables.c:155:30: [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). valuelen=strlen(value); data/kbtin-1.0.20/variables.c:404:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int last = strlen(arg); data/kbtin-1.0.20/variables.c:625: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). tailend = tailbeg + strlen(tailbeg); data/kbtin-1.0.20/variables.c:958: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). p=n+strlen(del); data/kbtin-1.0.20/variables.c:967: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(res)>BUFFER_SIZE-10) data/kbtin-1.0.20/variables.c:991:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int dellen=strlen(del); data/kbtin-1.0.20/variables.c:998: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 ((len+=strlen(temp)+dellen) > BUFFER_SIZE-10) ANALYSIS SUMMARY: Hits = 627 Lines analyzed = 19438 in approximately 0.58 seconds (33768 lines/second) Physical Source Lines of Code (SLOC) = 16856 Hits@level = [0] 56 [1] 81 [2] 411 [3] 14 [4] 121 [5] 0 Hits@level+ = [0+] 683 [1+] 627 [2+] 546 [3+] 135 [4+] 121 [5+] 0 Hits/KSLOC@level+ = [0+] 40.5197 [1+] 37.1974 [2+] 32.392 [3+] 8.00902 [4+] 7.17845 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.