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/splitvt-1.6.6/terminal.h Examining data/splitvt-1.6.6/utils/title.c Examining data/splitvt-1.6.6/utils/treset.c Examining data/splitvt-1.6.6/utils/unman.c Examining data/splitvt-1.6.6/utils/which.c Examining data/splitvt-1.6.6/video.h Examining data/splitvt-1.6.6/vt100.h Examining data/splitvt-1.6.6/vtmouse.h Examining data/splitvt-1.6.6/parserc.c Examining data/splitvt-1.6.6/vtmouse.c Examining data/splitvt-1.6.6/lock.c Examining data/splitvt-1.6.6/videomem.c Examining data/splitvt-1.6.6/cut-paste.c Examining data/splitvt-1.6.6/terminal.c Examining data/splitvt-1.6.6/splitvt.h Examining data/splitvt-1.6.6/misc.c Examining data/splitvt-1.6.6/vt100.c Examining data/splitvt-1.6.6/splitvt.c Examining data/splitvt-1.6.6/utmp.c Examining data/splitvt-1.6.6/vttest.c Examining data/splitvt-1.6.6/config.c FINAL RESULTS: data/splitvt-1.6.6/utils/unman.c:16:10: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. while ( gets(buffer) != NULL ) { data/splitvt-1.6.6/utmp.c:227:10: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (void) chmod(tty, 0620); /* crw--w---- */ data/splitvt-1.6.6/utmp.c:228:10: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (void) chown(tty, uid, sb.st_gid); data/splitvt-1.6.6/utmp.c:297:10: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (void) chmod(tty, 0666); /* crw-rw-rw- */ data/splitvt-1.6.6/utmp.c:298:10: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (void) chown(tty, 0, sb.st_gid); data/splitvt-1.6.6/config.c:10:41: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define VERBOSE_PRINT(X) if ( verbose ) printf(X) data/splitvt-1.6.6/config.c:24:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s/%s", dir, file); data/splitvt-1.6.6/config.c:37:20: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (( pipe_fp = popen("dpkg-architecture -qDEB_HOST_MULTIARCH", "r")) == NULL){ data/splitvt-1.6.6/config.c:42:4: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(pipe_fp,"%s",debhostmultiarch); data/splitvt-1.6.6/config.c:46:4: [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(deblibmultiarch, debhostmultiarch); data/splitvt-1.6.6/config.c:207:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if ( (access("/var/run/utmp", (R_OK|W_OK)) == 0) && getuid() ) data/splitvt-1.6.6/config.c:254:2: [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. system("sh scanpty >>Makefile"); data/splitvt-1.6.6/config.c:263:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "\nCFLAGS += -Wall %s $(PTYOPTS)\nLIBS = %s\n", cflags, ldflags); data/splitvt-1.6.6/config.c:296:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s/%s", dir, file); data/splitvt-1.6.6/cut-paste.c:234:4: [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(selbuf, buffer); data/splitvt-1.6.6/lock.c:56:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(message, data/splitvt-1.6.6/misc.c:126:3: [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. system("stty sane echo echoe intr '^C' erase '^H'"); data/splitvt-1.6.6/misc.c:145:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(((*argv[0] == '-') ? argv[0]+1 : argv[0]), argv); data/splitvt-1.6.6/misc.c:185:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tty_name, ttyptr); data/splitvt-1.6.6/misc.c:263:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tty_name, ttyptr); data/splitvt-1.6.6/misc.c:372:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tty_name, "%s", pty_name); data/splitvt-1.6.6/misc.c:376:10: [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(tty_name, R_OK|W_OK) == 0 ) { data/splitvt-1.6.6/misc.c:791:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newptr, string); data/splitvt-1.6.6/misc.c:866:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newpath, path); data/splitvt-1.6.6/misc.c:876:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s/%s", paths[i], command); data/splitvt-1.6.6/misc.c:955:4: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/splitvt-1.6.6/parserc.c:133: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(upper_args[i-2], args[i]); data/splitvt-1.6.6/parserc.c:143: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(lower_args[i-2], args[i]); data/splitvt-1.6.6/parserc.c:158:4: [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(upper_args[i-1], args[i]); data/splitvt-1.6.6/parserc.c:159:4: [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(lower_args[i-1], args[i]); data/splitvt-1.6.6/parserc.c:249:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(rcfile_buf, home); data/splitvt-1.6.6/parserc.c:250:3: [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(rcfile_buf, SPLITVTRC); data/splitvt-1.6.6/parserc.c:257:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(rcfile_buf, startupfile); data/splitvt-1.6.6/parserc.c:334:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ptr, envptr); data/splitvt-1.6.6/splitvt.c:258:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, version+4); data/splitvt-1.6.6/splitvt.c:318:10: [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). (void) strcpy(upper_tty, tty_name); data/splitvt-1.6.6/splitvt.c:339:10: [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). (void) strcpy(lower_tty, tty_name); data/splitvt-1.6.6/splitvt.c:449:8: [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(selection, vt_getselbuf()); data/splitvt-1.6.6/splitvt.c:571:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. case 'k': sprintf(message, "Kill %s window? [Y/n]: ", data/splitvt-1.6.6/splitvt.c:590:14: [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). case 'p': strcpy(selection, vt_getselbuf()); data/splitvt-1.6.6/splitvt.c:788:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(temp, "-%s", args[0]); data/splitvt-1.6.6/terminal.c:111:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errmesg, data/splitvt-1.6.6/terminal.c:121:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errmesg, data/splitvt-1.6.6/terminal.c:293:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(terminal_type, termtype); data/splitvt-1.6.6/utils/which.c:62:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newpath, path); data/splitvt-1.6.6/utils/which.c:72:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s/%s", paths[i], command); data/splitvt-1.6.6/utmp.c:51:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(saved_tty, tty); data/splitvt-1.6.6/vt100.c:1053:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(format, prompt); data/splitvt-1.6.6/vt100.c:1090:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(format, info); data/splitvt-1.6.6/vtmouse.c:77:2: [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. system("stty -echo raw"); data/splitvt-1.6.6/vtmouse.c:81:2: [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. system("stty -raw echo"); data/splitvt-1.6.6/vtmouse.c:104:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "xprop -id %s", title); data/splitvt-1.6.6/vtmouse.c:111: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(buffer, title); data/splitvt-1.6.6/vtmouse.c:120:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(title, buffer); data/splitvt-1.6.6/cut-paste.c:211:24: [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 ( (display=(char *)getenv("DISPLAY")) && pathsearch("xcb", 1) ) data/splitvt-1.6.6/misc.c:862:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (path=(char *)getenv("PATH")) == NULL ) data/splitvt-1.6.6/parserc.c:232:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (home=(char *)getenv("HOME")) == NULL ) { data/splitvt-1.6.6/parserc.c:330:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (envptr=(char *)getenv(envbuf)) ) { data/splitvt-1.6.6/splitvt.c:169:13: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ( (i=getopt(argc, argv, "fn:u:l:r:b:s:t:vh")) != EOF ) data/splitvt-1.6.6/splitvt.c:281: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 (((upper_args[0]=(char *)getenv("SHELL")) == NULL) || data/splitvt-1.6.6/splitvt.c:287: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 (((lower_args[0]=(char *)getenv("SHELL")) == NULL) || data/splitvt-1.6.6/terminal.c:273:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char *getenv(); data/splitvt-1.6.6/terminal.c:276: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. if ( (termtype=getenv("TERM")) == NULL ) data/splitvt-1.6.6/utils/which.c:58:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (path=(char *)getenv("PATH")) == NULL ) data/splitvt-1.6.6/vt100.c:889:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (ptr=(char *)getenv("LINES")) != NULL ) data/splitvt-1.6.6/vt100.c:891:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (ptr=(char *)getenv("COLUMNS")) != NULL ) data/splitvt-1.6.6/vtmouse.c:101:22: [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 ( (title=(char *)getenv("WINDOWID")) ) { data/splitvt-1.6.6/vtmouse.c:142:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (termtype=(char *)getenv("TERM")) && strcmp(termtype, "xterm") == 0 ) { data/splitvt-1.6.6/config.c:22:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ]; data/splitvt-1.6.6/config.c:35:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char debhostmultiarch[BUFSIZ]; data/splitvt-1.6.6/config.c:45:4: [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(deblibmultiarch,"/usr/lib/"); data/splitvt-1.6.6/config.c:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cflags[BUFSIZ], ldflags[BUFSIZ]; data/splitvt-1.6.6/config.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[BUFSIZ]; data/splitvt-1.6.6/config.c:75:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (makefile=fopen("Makefile", "w")) == NULL ) data/splitvt-1.6.6/config.c:83:2: [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(cflags, "-g -DDEBUG"); data/splitvt-1.6.6/config.c:94:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(cflags, " -O2"); data/splitvt-1.6.6/config.c:99:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(cflags, " -O2"); data/splitvt-1.6.6/config.c:106:3: [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(cflags, " -DHP_UX"); data/splitvt-1.6.6/config.c:108:3: [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(ldflags, " -lsocket"); data/splitvt-1.6.6/config.c:109:3: [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(cflags, " -g -DSOLARIS"); data/splitvt-1.6.6/config.c:116:3: [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(cflags, " -O2"); data/splitvt-1.6.6/config.c:118:3: [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(cflags, " -O"); data/splitvt-1.6.6/config.c:124:3: [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(cflags, " -DIRIX"); data/splitvt-1.6.6/config.c:132: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 deblibmultiarch[BUFSIZ]; data/splitvt-1.6.6/config.c:135:3: [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(cflags, " -DTERMCAP"); data/splitvt-1.6.6/config.c:136:3: [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(ldflags, " -ltermcap"); data/splitvt-1.6.6/config.c:142:3: [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(cflags, " -DHAVE_UTHOST"); data/splitvt-1.6.6/config.c:143:3: [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(ldflags, " -lutil"); data/splitvt-1.6.6/config.c:149:3: [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(cflags, " -DHAVE_TERMIOS_H"); data/splitvt-1.6.6/config.c:152:3: [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(cflags, " -DHAVE_TERMIO_H"); data/splitvt-1.6.6/config.c:159:3: [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(cflags, " -DHAVE_UNISTD_H"); data/splitvt-1.6.6/config.c:164:3: [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(cflags, " -DHAVE_BSDTTY_H"); data/splitvt-1.6.6/config.c:171:3: [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(cflags, " -DNEED_COMPAT_H"); data/splitvt-1.6.6/config.c:179:3: [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(cflags, " -DNEED_INET_H"); data/splitvt-1.6.6/config.c:185:3: [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(cflags, " -DNEED_SELECT_H"); data/splitvt-1.6.6/config.c:191:3: [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(cflags, " -DHAVE_WAIT4"); data/splitvt-1.6.6/config.c:197:3: [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(ldflags, " -lnet"); data/splitvt-1.6.6/config.c:199:3: [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(ldflags, " -lnsl"); data/splitvt-1.6.6/config.c:201:3: [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(ldflags, " -lnsl_s"); data/splitvt-1.6.6/config.c:203:3: [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(ldflags, " -lsun"); data/splitvt-1.6.6/config.c:242:3: [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(cflags, " -DSHELL=\\\"/bin/csh\\\""); data/splitvt-1.6.6/config.c:244:3: [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(cflags, " -DSHELL=\\\"/bin/sh\\\""); data/splitvt-1.6.6/config.c:255:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (makefile=fopen("Makefile", "a")) == NULL ) data/splitvt-1.6.6/config.c:294:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *wptr, *ptr, buffer[BUFSIZ]; data/splitvt-1.6.6/config.c:297:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fp=fopen(buffer, "r")) == NULL ) data/splitvt-1.6.6/cut-paste.c:218: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 selbuf[BUFSIZ]; data/splitvt-1.6.6/cut-paste.c:223:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ]; data/splitvt-1.6.6/lock.c:22: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 entered1[BUFSIZ], entered2[BUFSIZ]; data/splitvt-1.6.6/lock.c:35:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[512]; data/splitvt-1.6.6/lock.c:62:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(message, data/splitvt-1.6.6/lock.c:77:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(message, data/splitvt-1.6.6/misc.c:69:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char LINES[12], COLUMNS[12]; data/splitvt-1.6.6/misc.c:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char SPLITVT[24]; data/splitvt-1.6.6/misc.c:107:4: [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(LINES, "LINES=%d", WU_lines); data/splitvt-1.6.6/misc.c:109:4: [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(LINES, "LINES=%d", WL_lines); data/splitvt-1.6.6/misc.c:111:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(COLUMNS, "COLUMNS=%d", W_columns); data/splitvt-1.6.6/misc.c:116:4: [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(SPLITVT, "SPLITVT=upper"); data/splitvt-1.6.6/misc.c:118:4: [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(SPLITVT, "SPLITVT=lower"); data/splitvt-1.6.6/misc.c:162: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 tty_name[64]={'\0'}; data/splitvt-1.6.6/misc.c:163: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 pty_name[64]={'\0'}; data/splitvt-1.6.6/misc.c:206:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (slave_fd=open(slavename, O_RDWR)) < 0 ) /* open the slave */ data/splitvt-1.6.6/misc.c:234:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (master_fd=open(DEV_CLONE, O_RDWR)) < 0 ) data/splitvt-1.6.6/misc.c:279:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (slave_fd=open(slavename, O_RDWR)) < 0 ) /* open the slave */ data/splitvt-1.6.6/misc.c:344:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(pty_name, "/dev/ptyXY"); data/splitvt-1.6.6/misc.c:367:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (master_fd=open(pty_name, O_RDWR)) >= 0 ) data/splitvt-1.6.6/misc.c:398:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (slave_fd=open(tty_name, O_RDWR)) < 0 ) data/splitvt-1.6.6/misc.c:450:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd=open("/dev/tty", O_RDWR)) > (-1) ) data/splitvt-1.6.6/misc.c:857:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *path, *newpath, *paths[256]; data/splitvt-1.6.6/misc.c:858: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. static char buffer[1024]; data/splitvt-1.6.6/misc.c:915:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[4]; data/splitvt-1.6.6/parserc.c:89:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ( (i=atoi(args[2])) == 0 ) { data/splitvt-1.6.6/parserc.c:129:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *)malloc(strlen(args[i])+1)) == NULL ) { data/splitvt-1.6.6/parserc.c:139:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *)malloc(strlen(args[i])+1)) == NULL ) { data/splitvt-1.6.6/parserc.c:153:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if ( ((upper_args[i-1]=(char *)malloc(strlen(args[i])+1)) == NULL) || data/splitvt-1.6.6/parserc.c:154:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((lower_args[i-1]=(char *)malloc(strlen(args[i])+1)) == NULL) ) { data/splitvt-1.6.6/parserc.c:225:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[BUFSIZ], newline[BUFSIZ*2], *parsed[256]; data/splitvt-1.6.6/parserc.c:227:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *envptr, envbuf[128]; data/splitvt-1.6.6/parserc.c:264:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (rcfd=open(rcfile_buf, O_RDONLY, 0)) < 0 ) { data/splitvt-1.6.6/splitvt.c:57: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 upper_tty[64]={'\0'}; /* tty_name of the upper window */ data/splitvt-1.6.6/splitvt.c:58: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 lower_tty[64]={'\0'}; /* tty_name of the lower window */ data/splitvt-1.6.6/splitvt.c:71: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 selection[BUFSIZ]; /* Screen selection buffer */ data/splitvt-1.6.6/splitvt.c:87:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *upper_args[MAX_ARGS+1]={NULL}, *lower_args[MAX_ARGS+1]={NULL}; data/splitvt-1.6.6/splitvt.c:124:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ], *ptr; data/splitvt-1.6.6/splitvt.c:213:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': UU_lines=atoi(optarg); data/splitvt-1.6.6/splitvt.c:541:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[BUFSIZ]; data/splitvt-1.6.6/splitvt.c:786: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. if ( (temp=(char *)malloc(strlen(args[0])+2)) == NULL ) data/splitvt-1.6.6/splitvt.h:27:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char *upper_args[MAX_ARGS+1], *lower_args[MAX_ARGS+1]; data/splitvt-1.6.6/terminal.c:97:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char termcap_entry[2048]; /* termcap entry for the terminal */ data/splitvt-1.6.6/terminal.c:98:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char termcap_area[2048]; /* Static buffer for capabilities */ data/splitvt-1.6.6/terminal.c:105: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. static char errmesg[BUFSIZ]; data/splitvt-1.6.6/utils/unman.c:13:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ], newbuf[BUFSIZ]; data/splitvt-1.6.6/utils/which.c:53:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *path, *newpath, *paths[256]; data/splitvt-1.6.6/utils/which.c:54: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. static char buffer[1024]; data/splitvt-1.6.6/utmp.c:30: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 saved_tty[128]; data/splitvt-1.6.6/utmp.c:85:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd=open(UTMP_FILE, O_RDWR)) < 0 ) data/splitvt-1.6.6/utmp.c:122:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd=open(UTMP_FILE, O_RDWR)) < 0 ) data/splitvt-1.6.6/utmp.c:148:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd=open(UTMP_FILE, (O_RDWR|O_APPEND))) < 0 ) data/splitvt-1.6.6/video.h:29:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char charset[NCHARSETS]; /* Current character set */ data/splitvt-1.6.6/vt100.c:43: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 terminal_type[BUFSIZ]; /* Our terminal type */ data/splitvt-1.6.6/vt100.c:381:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reply[128]; data/splitvt-1.6.6/vt100.c:651:6: [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(reply, "\033[%d;%dR", data/splitvt-1.6.6/vt100.c:890:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). physical.rows=atoi(ptr); data/splitvt-1.6.6/vt100.c:892:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). physical.cols=atoi(ptr); data/splitvt-1.6.6/vt100.c:1043:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char format[BUFSIZ], buff[1]; data/splitvt-1.6.6/vt100.c:1051:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(format, "%%.%ds", physical.cols); data/splitvt-1.6.6/vt100.c:1079:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char format[80]; data/splitvt-1.6.6/vt100.c:1088:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(format, "%%.%ds", physical.cols); data/splitvt-1.6.6/vtmouse.c:97:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[512], *title; data/splitvt-1.6.6/vtmouse.c:100:2: [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(buffer, "xterm"); data/splitvt-1.6.6/vtmouse.c:113: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(buffer, "xterm"); data/splitvt-1.6.6/vtmouse.c:116:4: [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(buffer, "xterm"); data/splitvt-1.6.6/vtmouse.c:168: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. static char prefix[8], *next; data/splitvt-1.6.6/vtmouse.c:178:4: [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(prefix, "\033["); /* Sequence prefix */ data/splitvt-1.6.6/vttest.c:62:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[512]; data/splitvt-1.6.6/vttest.c:70:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd=open("/dev/tty", O_RDWR, 0666)) < 0 ) data/splitvt-1.6.6/config.c:47:4: [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(deblibmultiarch, "/"); data/splitvt-1.6.6/cut-paste.c:245:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(selbuf, buffer, BUFSIZ-1); data/splitvt-1.6.6/cut-paste.c:248:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) fwrite(selbuf, sizeof(char), strlen(selbuf), xcb); data/splitvt-1.6.6/cut-paste.c:268:13: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c=getchar()) != EOF ) { data/splitvt-1.6.6/misc.c:182: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 ( ttyptr == NULL || strlen(ttyptr)+1 > sizeof(tty_name) ) data/splitvt-1.6.6/misc.c:257: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 ( ttyptr == NULL || strlen(ttyptr)+1 > sizeof(tty_name) ) data/splitvt-1.6.6/misc.c:788: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). if ( (newptr=(char *)malloc(strlen(string)+1)) == NULL ) data/splitvt-1.6.6/misc.c:864:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (newpath=(char *)malloc(strlen(path)+1)) == NULL ) data/splitvt-1.6.6/parserc.c:125:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (*args[1] == '-') && (strlen(args[1]) > 1) ) { data/splitvt-1.6.6/parserc.c:129:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (char *)malloc(strlen(args[i])+1)) == NULL ) { data/splitvt-1.6.6/parserc.c:139:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (char *)malloc(strlen(args[i])+1)) == NULL ) { data/splitvt-1.6.6/parserc.c:153: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). if ( ((upper_args[i-1]=(char *)malloc(strlen(args[i])+1)) == NULL) || data/splitvt-1.6.6/parserc.c:154: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). ((lower_args[i-1]=(char *)malloc(strlen(args[i])+1)) == NULL) ) { data/splitvt-1.6.6/parserc.c:244: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). rcfile_buf=(char *)malloc(strlen(home)+sizeof(SPLITVTRC)); data/splitvt-1.6.6/parserc.c:252: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). rcfile_buf=(char *)malloc(strlen(startupfile)+1); data/splitvt-1.6.6/parserc.c:301:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for ( tail=(head+strlen(head)); data/splitvt-1.6.6/parserc.c:332: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). if ( (ptr+strlen(envptr)-newline) < data/splitvt-1.6.6/parserc.c:335: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). ptr+=strlen(envptr); data/splitvt-1.6.6/splitvt.c:450: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). write(thisfd, selection, strlen(selection)); data/splitvt-1.6.6/splitvt.c:473:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (len=read(bottomfd, buffer, BUFSIZ)) <= 0 ) data/splitvt-1.6.6/splitvt.c:491:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (len=read(topfd, buffer, BUFSIZ)) <= 0 ) data/splitvt-1.6.6/splitvt.c:546:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(ttyfd, &c, 1); data/splitvt-1.6.6/splitvt.c:591: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). write(thisfd, selection, strlen(selection)); data/splitvt-1.6.6/splitvt.c:786:28: [1] (buffer) strlen: Does not handle 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 ( (temp=(char *)malloc(strlen(args[0])+2)) == NULL ) data/splitvt-1.6.6/terminal.c:284:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(termtype) > 256 ) data/splitvt-1.6.6/utils/which.c:60:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (newpath=(char *)malloc(strlen(path)+1)) == NULL ) data/splitvt-1.6.6/utmp.c:42: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). if ( tty == NULL || strlen(tty)+1 > sizeof(saved_tty) ) data/splitvt-1.6.6/utmp.c:99:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(fd,(char *) &ut, sizeof(ut)) == sizeof(ut)) { data/splitvt-1.6.6/utmp.c:136:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(fd,(char *) &ut, sizeof(ut)) == sizeof(ut)) { data/splitvt-1.6.6/utmp.c:191:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut.ut_name, user, sizeof(ut.ut_name)-1); data/splitvt-1.6.6/utmp.c:193:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut.ut_line, ttyptr, sizeof(ut.ut_line)-1); data/splitvt-1.6.6/utmp.c:203:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut.ut_host, saved_utmp.ut_host, sizeof(ut.ut_host)-1); data/splitvt-1.6.6/utmp.c:207:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(ut.ut_host, "splitvt", 8); data/splitvt-1.6.6/vt100.c:654:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write(*source, reply, strlen(reply)); data/splitvt-1.6.6/vt100.c:1058:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( read(0, buff, 1) <= 0 ) data/splitvt-1.6.6/vt100.c:1136:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/splitvt-1.6.6/vtmouse.c:102: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("xprop -id ")+strlen(title)+1) > 512 ) data/splitvt-1.6.6/vtmouse.c:102: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). if ( (strlen("xprop -id ")+strlen(title)+1) > 512 ) data/splitvt-1.6.6/vtmouse.c:108:8: [1] (buffer) strlen: Does not handle 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(buffer) > strlen("WM_NAME(STRING) = \"")) { data/splitvt-1.6.6/vtmouse.c:108:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(buffer) > strlen("WM_NAME(STRING) = \"")) { data/splitvt-1.6.6/vtmouse.c:109: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). buffer[strlen(buffer)-2]='\0'; data/splitvt-1.6.6/vtmouse.c:110: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). title=(buffer+strlen("WM_NAME(STRING) = \"")); data/splitvt-1.6.6/vtmouse.c:118:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (title=(char *)malloc(strlen(buffer)+1)) == NULL ) data/splitvt-1.6.6/vtmouse.c:180:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c=getc(xt_input)) != EOF ) { data/splitvt-1.6.6/vtmouse.c:201:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:202:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). X_event->y=(getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:204:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). X_event->x=(getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:247:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:249:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:253:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). X_event->y=(getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:254:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). X_event->x=(getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:258:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:260:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:262:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:264:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (getc(xt_input)-' '); data/splitvt-1.6.6/vtmouse.c:279:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return(getc(xt_input)); data/splitvt-1.6.6/vttest.c:116:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( read(fd, &buff[x++], 1) <= 0 ) ANALYSIS SUMMARY: Hits = 232 Lines analyzed = 6079 in approximately 0.18 seconds (33509 lines/second) Physical Source Lines of Code (SLOC) = 4949 Hits@level = [0] 172 [1] 57 [2] 107 [3] 14 [4] 49 [5] 5 Hits@level+ = [0+] 404 [1+] 232 [2+] 175 [3+] 68 [4+] 54 [5+] 5 Hits/KSLOC@level+ = [0+] 81.6327 [1+] 46.8782 [2+] 35.3607 [3+] 13.7401 [4+] 10.9113 [5+] 1.01031 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.