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/bvi-1.4.0/re.c Examining data/bvi-1.4.0/dosconf.h Examining data/bvi-1.4.0/set.h Examining data/bvi-1.4.0/recomp.c Examining data/bvi-1.4.0/io.c Examining data/bvi-1.4.0/bm_unix.c Examining data/bvi-1.4.0/bvi.h Examining data/bvi-1.4.0/bmore.c Examining data/bvi-1.4.0/doscur.h Examining data/bvi-1.4.0/bmore.h Examining data/bvi-1.4.0/patchlevel.h Examining data/bvi-1.4.0/set.c Examining data/bvi-1.4.0/edit.c Examining data/bvi-1.4.0/acconfig.h Examining data/bvi-1.4.0/bm_dos.c Examining data/bvi-1.4.0/bvi.c Examining data/bvi-1.4.0/comm.c Examining data/bvi-1.4.0/dosio.c FINAL RESULTS: data/bvi-1.4.0/doscur.h:114:49: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #define mvwgetstr(w,y,x,s) gotoxy(x+1,y+1);gets(s) data/bvi-1.4.0/doscur.h:115:49: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #define mvgetstr(y,x,s) gotoxy(x+1,y+1);gets(s) data/bvi-1.4.0/doscur.h:116:33: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #define wgetstr(w,s) gets(s) data/bvi-1.4.0/bm_dos.c:83: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(cmd); data/bvi-1.4.0/bm_unix.c:175:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cline, "%s -i", shell); data/bvi-1.4.0/bm_unix.c:178:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cline, "%s -c \"%s\"", shell, cmd); data/bvi-1.4.0/bm_unix.c:184:8: [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. ret = system(cmd); data/bvi-1.4.0/bmore.c:39:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define PRINTF printf data/bvi-1.4.0/bmore.c:128: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(helppath, argv[0]); data/bvi-1.4.0/bmore.c:186: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(sstring, &argv[n][2]); data/bvi-1.4.0/bmore.c:497:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "bvi +%lu %s", data/bvi-1.4.0/bmore.c:502:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "bvi -b %lu -s %lu %s", data/bvi-1.4.0/bmore.c:537: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(bstring, sstring); data/bvi-1.4.0/bmore.c:563: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(sstring, bstring); data/bvi-1.4.0/bvi.c:156:6: [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(cmdstr, argv[++n]); data/bvi-1.4.0/bvi.c:200: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(cmdstr, &argv[n][1]); data/bvi-1.4.0/bvi.c:279:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. AnzAdd = sprintf(tmp, addr_form, block_begin); data/bvi-1.4.0/bvi.c:969:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rep_buf, "%ld%c%s%c", precount, ch, numarr, ch1); data/bvi-1.4.0/comm.c:118: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(buff, cmdline); data/bvi-1.4.0/comm.c:173: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(cmdbuf, cmd); /* save the unmodified command */ data/bvi-1.4.0/comm.c:182: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(cmdbuf + 1, oldbuf); data/bvi-1.4.0/comm.c:188:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. } else sprintf(oldbuf, "\n%s\n", cmdbuf + 1); data/bvi-1.4.0/comm.c:197:9: [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. ret = system(cmdbuf + 1); data/bvi-1.4.0/comm.c:210:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "What?|%s: Not an editor command", cmdbuf); data/bvi-1.4.0/comm.c:298:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (oldbuf, c_argv[0]); data/bvi-1.4.0/comm.c:299:11: [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 (oldbuf, name); data/bvi-1.4.0/comm.c:300:11: [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 (oldbuf, p + 1); data/bvi-1.4.0/comm.c:314:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "File exists@- use \"%s! %s\" to overwrite", cmdname, c_argv[0]); data/bvi-1.4.0/comm.c:365: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(string, files[n]); data/bvi-1.4.0/comm.c:382:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(string, nowrtmsg, "cd"); data/bvi-1.4.0/comm.c:431:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(string, nowrtmsg, "next"); data/bvi-1.4.0/comm.c:454:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(string, nowrtmsg, "rewind"); data/bvi-1.4.0/comm.c:492:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "bvi version %s %s", VERSION, copyright); data/bvi-1.4.0/comm.c:504:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(string, nowrtmsg, "quit"); data/bvi-1.4.0/comm.c:508:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "%d %s", numfiles - curfile - 1, morefiles); data/bvi-1.4.0/comm.c:563:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "What?|%s: Not an editor command", cmd); data/bvi-1.4.0/comm.c:637:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" File is read only", name); data/bvi-1.4.0/comm.c:651:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "%d %s", numfiles - curfile - 1, morefiles); data/bvi-1.4.0/comm.c:666:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(string, nowrtmsg, "edit"); data/bvi-1.4.0/comm.c:754:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "%s: %s", s, strerror(errno)); data/bvi-1.4.0/comm.c:756:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "%s: %s", s, sys_errlist[errno]); data/bvi-1.4.0/dosio.c:149:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Is a directory", fname); data/bvi-1.4.0/dosio.c:164:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" range %lu-%lu", fname, data/bvi-1.4.0/dosio.c:177:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" %s%lu@bytes", fname, newstr, (long)filesize); data/bvi-1.4.0/dosio.c:213:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(fname, 2)) { data/bvi-1.4.0/dosio.c:258:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" No such range: %lu-%lu", fname, data/bvi-1.4.0/dosio.c:261:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" range %lu-%lu", fname, data/bvi-1.4.0/dosio.c:289:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" [New File]", fname); data/bvi-1.4.0/dosio.c:292:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" %s%lu bytes", fname, data/bvi-1.4.0/dosio.c:296:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Directory", fname); data/bvi-1.4.0/dosio.c:354: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(rcpath, dir); data/bvi-1.4.0/dosio.c:397: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(""); data/bvi-1.4.0/edit.c:480:16: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). if (P(P_US)) strcpy(str, contru[Char1]); data/bvi-1.4.0/edit.c:481:16: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(str, contrd[Char1]); data/bvi-1.4.0/edit.c:483:19: [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). if (P(P_US)) strcpy(str, contru[32]); data/bvi-1.4.0/edit.c:484:16: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(str, contrd[32]); data/bvi-1.4.0/edit.c:497:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. statsize = sprintf(string, "%08llX %s \\%03o 0x%02X %3d %3s", data/bvi-1.4.0/edit.c:523:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(linbuf, addr_form, (long long)(mempos - mem + P(P_OF))); data/bvi-1.4.0/edit.c:576: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(linbuf, tmpbuf); data/bvi-1.4.0/edit.c:741:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" ", fname); data/bvi-1.4.0/edit.c:760: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(string, fstatus); data/bvi-1.4.0/edit.c:806: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(getcbuff, s); data/bvi-1.4.0/edit.c:809:8: [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(getcbuff, s); data/bvi-1.4.0/io.c:89:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Is a directory", fname); data/bvi-1.4.0/io.c:94:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Character special file", fname); data/bvi-1.4.0/io.c:117:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" range %llu-%llu", fname, data/bvi-1.4.0/io.c:133:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" %s%llu bytes", fname, newstr, data/bvi-1.4.0/io.c:216:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(fname, W_OK)) { data/bvi-1.4.0/io.c:262:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Empty file", fname); data/bvi-1.4.0/io.c:265:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" range %llu-%llu", fname, data/bvi-1.4.0/io.c:289:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" [New File]", fname); data/bvi-1.4.0/io.c:292:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" %s%llu bytes", fname, data/bvi-1.4.0/io.c:297:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Directory", fname); data/bvi-1.4.0/io.c:300:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Character special file", fname); data/bvi-1.4.0/io.c:303:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "\"%s\" Block special file", fname); data/bvi-1.4.0/io.c:340: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(rcpath, dir); data/bvi-1.4.0/io.c:403:8: [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. ret = system(""); data/bvi-1.4.0/io.c:405:8: [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. ret = system(shell); data/bvi-1.4.0/re.c:333:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "No match to %s", direct == FORWARD ? "BOTTOM" : "TOP"); data/bvi-1.4.0/re.c:335:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "Address search hit %s without matching pattern", data/bvi-1.4.0/re.c:456:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "No match to %s", sdir == FORWARD ? "BOTTOM" : "TOP"); data/bvi-1.4.0/re.c:458:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "Address search hit %s without matching pattern", data/bvi-1.4.0/set.c:99:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %s%s", data/bvi-1.4.0/set.c:102:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %s=%s", params[i].fullname, data/bvi-1.4.0/set.c:106:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %s=%lld", params[i].fullname, data/bvi-1.4.0/set.c:118:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(string, "Option %s is not a toggle", data/bvi-1.4.0/set.c:189:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %s%s\n", data/bvi-1.4.0/set.c:192:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %s=%s\n", p->fullname, p->svalue); data/bvi-1.4.0/set.c:194:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, " %s=%lld\n", p->fullname, (long long)p->nvalue); data/bvi-1.4.0/bm_unix.c:101:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((term = getenv("TERM")) == 0 || tgetent(buf, term) <= 0) { data/bvi-1.4.0/bm_unix.c:163:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv(); data/bvi-1.4.0/bm_unix.c:171:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((shell = getenv("SHELL")) == NULL) shell = "sh"; data/bvi-1.4.0/dosio.c:350:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. shell = getenv("COMSPEC"); data/bvi-1.4.0/dosio.c:359: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 ((initstr = getenv("BVIINIT")) != NULL) { data/bvi-1.4.0/io.c:328:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. terminal = getenv("TERM"); data/bvi-1.4.0/io.c:329:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. shell = getenv("SHELL"); data/bvi-1.4.0/io.c:333: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 ((initstr = getenv("BVIINIT")) != NULL) { data/bvi-1.4.0/io.c:347:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. strncpy(rcpath, getenv("HOME"), MAXCMD - 8); data/bvi-1.4.0/bm_unix.c:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TBUFSIZ]; data/bvi-1.4.0/bm_unix.c:77: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 clearbuf[TBUFSIZ]; data/bvi-1.4.0/bm_unix.c:165: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 cline[128]; data/bvi-1.4.0/bm_unix.c:284:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(s2, s1, n); data/bvi-1.4.0/bmore.c:56: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 sstring[MAXCMD] = ""; /* string for search */ data/bvi-1.4.0/bmore.c:57: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 estring[MAXCMD] = ""; /* string for shell escape */ data/bvi-1.4.0/bmore.c:58: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 string[MAXCMD]; data/bvi-1.4.0/bmore.c:68: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 numarr[64]; /* string for collecting number */ data/bvi-1.4.0/bmore.c:69: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 addr_form[15]; data/bvi-1.4.0/bmore.c:76: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 buffer1[MAXCMD], buffer2[MAXCMD]; data/bvi-1.4.0/bmore.c:84: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 helppath[MAXCMD]; data/bvi-1.4.0/bmore.c:86: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 progname[10]; data/bvi-1.4.0/bmore.c:87: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 cmdbuf[MAXCMD]; data/bvi-1.4.0/bmore.c:93: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 bmore_search_pat[BUFFER]; /* / or ? command */ data/bvi-1.4.0/bmore.c:131: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(helppath, "\\BMORE.HLP"); data/bvi-1.4.0/bmore.c:230: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(addr_form, "%08lX "); data/bvi-1.4.0/bmore.c:483:23: [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 ((help_file = fopen(helppath, "r")) == NULL) { data/bvi-1.4.0/bmore.c:534: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 bstring[MAXCMD]; data/bvi-1.4.0/bmore.c:619: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 ((curr_file = fopen(name, "rb")) == NULL) { data/bvi-1.4.0/bmore.c:693:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer2, buffer1, num); data/bvi-1.4.0/bmore.c:734:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cmdbuf, where, n); data/bvi-1.4.0/bmore.c:754: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 act_pat[MAXCMD]; /* found pattern */ data/bvi-1.4.0/bvi.c:59: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 string[MAXCMD+1]; data/bvi-1.4.0/bvi.c:60: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 cmdstr[MAXCMD+1] = ""; data/bvi-1.4.0/bvi.c:80: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 numarr[MAXCMD+1]; /* string for collecting number */ data/bvi-1.4.0/bvi.c:81: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 rep_buf[BUFFER]; data/bvi-1.4.0/bvi.c:93: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 addr_form[15]; data/bvi-1.4.0/bvi.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 progname[8]; data/bvi-1.4.0/bvi.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 line[MAXCMD+1]; data/bvi-1.4.0/bvi.c:191:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). P(P_LI) = atoi(argv[n] + 2); data/bvi-1.4.0/bvi.c:272:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[sizeof(block_begin) * 2 + 3]; data/bvi-1.4.0/bvi.c:273: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. AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; data/bvi-1.4.0/bvi.c:278: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. sprintf(addr_form, "%%0%dllX ", AnzAdd); data/bvi-1.4.0/bvi.c:336: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(rep_buf, "%ld~", precount); data/bvi-1.4.0/bvi.c:522: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(string, "Max. address of current file : %06llX", (long long unsigned)(filesize - 1L + P(P_OF))); data/bvi-1.4.0/bvi.c:572: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(rep_buf, "%ldD", precount); data/bvi-1.4.0/bvi.c:577: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(rep_buf, "%ldo", precount); data/bvi-1.4.0/bvi.c:584: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(rep_buf, "%ldP", precount); data/bvi-1.4.0/bvi.c:594: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(rep_buf, "%ld%c", precount, ch); data/bvi-1.4.0/bvi.c:614:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(yank_buf, current, yanked); data/bvi-1.4.0/bvi.c:619:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(yank_buf, current, yanked); data/bvi-1.4.0/bvi.c:645: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(rep_buf, "%ldI", precount); data/bvi-1.4.0/bvi.c:654: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(rep_buf, "%lds", precount); data/bvi-1.4.0/bvi.c:664: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(rep_buf, "%ld%c", precount, ch); data/bvi-1.4.0/bvi.c:669: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(rep_buf, "%ldp", precount); data/bvi-1.4.0/bvi.c:686: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(rep_buf, "%ldx", precount); data/bvi-1.4.0/bvi.c:690: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(rep_buf, "%ldX", precount); data/bvi-1.4.0/bvi.c:702: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(rep_buf, "%ldx", precount); data/bvi-1.4.0/bvi.c:787:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mem + filesize, buf, count); data/bvi-1.4.0/bvi.c:810:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, current, undo_count); data/bvi-1.4.0/bvi.c:864:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, undo_start, undo_count); data/bvi-1.4.0/bvi.c:875:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_start, undo_buf, undo_count); data/bvi-1.4.0/bvi.c:902:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, loc, n); data/bvi-1.4.0/bvi.c:903:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(loc, buf, n); data/bvi-1.4.0/bvi.c:934:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_start, buf, n); data/bvi-1.4.0/bvi.h:125: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_memcpy data/bvi-1.4.0/comm.c:69: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 *c_argv[9]; data/bvi-1.4.0/comm.c:89:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char oldbuf[CMDSZ]; /** for :!! command **/ data/bvi-1.4.0/comm.c:102: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[CMDSZ]; data/bvi-1.4.0/comm.c:103:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmdbuf[CMDSZ]; data/bvi-1.4.0/comm.c:104: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 cmdname[MAXNAME]; data/bvi-1.4.0/comm.c:160: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(string, "Negative address@- first byte is %lld", (long long)P(P_OF)); data/bvi-1.4.0/comm.c:233: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(string, "%d subs|%d substitutions", repl_count, repl_count); data/bvi-1.4.0/comm.c:389: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(string, "%c", DELIM); data/bvi-1.4.0/comm.c:480:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(yank_buf, start_addr, yanked); data/bvi-1.4.0/comm.c:481: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(string, "%lu bytes", (long)yanked); data/bvi-1.4.0/comm.c:568: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(string, "%lu bytes", (long)undo_count); data/bvi-1.4.0/comm.c:611: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). count = atoi(c_argv[0]); data/bvi-1.4.0/comm.c:751: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 string[256]; data/bvi-1.4.0/dosio.c:106: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[80]; data/bvi-1.4.0/dosio.c:135: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 string[255]; data/bvi-1.4.0/dosio.c:157: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 ((fd = open(fname, flags, 0666)) < 0) { data/bvi-1.4.0/dosio.c:201: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 string[MAXCMD]; data/bvi-1.4.0/dosio.c:211:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(fname, O_RDONLY|O_BINARY)) > 0) { data/bvi-1.4.0/dosio.c:321: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 ((fd = open(fname, O_RDONLY)) == -1) { data/bvi-1.4.0/dosio.c:348: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 rcpath[255]; data/bvi-1.4.0/dosio.c:357: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(rcpath, "\\BVI.RC"); data/bvi-1.4.0/edit.c:46: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 tmpbuf[10]; data/bvi-1.4.0/edit.c:47: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 linbuf[16384]; data/bvi-1.4.0/edit.c:50: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 getcbuff[BUFFER]; data/bvi-1.4.0/edit.c:154: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(tmpbuf, "%c%c", ch, ch1); data/bvi-1.4.0/edit.c:240: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(curpos + 1L, curpos - count + 1L, count); data/bvi-1.4.0/edit.c:255: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(undo_buf + psize, curpos + 1L, count); data/bvi-1.4.0/edit.c:257: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(curpos + 1L, curpos - count + 1L, count); data/bvi-1.4.0/edit.c:461: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 bin_val [9]; data/bvi-1.4.0/edit.c:465: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 string[MAXCMD+1], str[6]; data/bvi-1.4.0/edit.c:478: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(str, "'%c'", Char1); data/bvi-1.4.0/edit.c:486: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(str, " "); data/bvi-1.4.0/edit.c:520: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(linbuf, "~ "); data/bvi-1.4.0/edit.c:570: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(tmpbuf, " "); data/bvi-1.4.0/edit.c:574: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(tmpbuf, "%02X ", cur_ch); data/bvi-1.4.0/edit.c:732: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 fstatus[MAXCMD]; data/bvi-1.4.0/edit.c:748: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(string, "No file "); data/bvi-1.4.0/edit.c:751: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(string, "[Not edited] "); data/bvi-1.4.0/edit.c:752:15: [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. if (P(P_RO)) strcat(string, "[Read only] "); data/bvi-1.4.0/edit.c:753: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. if (edits) strcat(string, "[Modified] "); data/bvi-1.4.0/edit.c:756: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(fstatus, "byte %llu of %llu --%llu%%--", data/bvi-1.4.0/edit.c:762: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(string, " 0 bytes"); data/bvi-1.4.0/edit.c:827:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, start - undo_count, undo_count); data/bvi-1.4.0/edit.c:828:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(yank_buf, start - undo_count, undo_count); data/bvi-1.4.0/edit.c:851:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, start, undo_count); data/bvi-1.4.0/edit.c:852:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(yank_buf, start, undo_count); data/bvi-1.4.0/edit.c:964:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, tempbuf, count); data/bvi-1.4.0/io.c:109: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 ((fd = open(fname, flags, 0666)) < 0) { data/bvi-1.4.0/io.c:192:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(fname, O_RDONLY)) > 0) { data/bvi-1.4.0/io.c:210:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(fname, O_RDONLY)) > 0) { data/bvi-1.4.0/io.c:326: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 rcpath[MAXCMD]; data/bvi-1.4.0/io.c:339: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(rcpath, "c:"); data/bvi-1.4.0/io.c:343: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(rcpath, "\\BVI.RC"); data/bvi-1.4.0/io.c:349: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(rcpath, "/.bvirc"); data/bvi-1.4.0/io.c:354: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(rcpath, ".bvirc"); data/bvi-1.4.0/io.c:421:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, s, n); data/bvi-1.4.0/io.c:437:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(s2, s1, n); data/bvi-1.4.0/io.c:472: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 ((fd = open(fname, O_RDONLY)) == -1) { data/bvi-1.4.0/re.c:39: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 act_pat[MAXCMD]; /* found pattern */ data/bvi-1.4.0/re.c:40: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 pattern[MAXCMD + 1]; data/bvi-1.4.0/re.c:41: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 search_pat[BUFFER]; /* / or ? command */ data/bvi-1.4.0/re.c:232: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 find_pat[BUFFER]; data/bvi-1.4.0/re.c:233: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 repl_pat[MAXCMD]; data/bvi-1.4.0/re.c:256:14: [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. default: sprintf(string, data/bvi-1.4.0/re.c:315:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, startpos + 1, undo_count); data/bvi-1.4.0/re.c:353: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(undo_buf, current_start, undo_count); data/bvi-1.4.0/re.c:358:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(current_start, repl_pat, pat_len); data/bvi-1.4.0/re.c:387: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 m[2]; data/bvi-1.4.0/recomp.c:265: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 tmpbuf[3]; data/bvi-1.4.0/set.c:38: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 fbuf[MAXCMD+1]; data/bvi-1.4.0/set.c:39: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 buf[MAXCMD+1]; data/bvi-1.4.0/set.c:74: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 string[80]; data/bvi-1.4.0/set.c:214:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ffp = fopen(fn, "r")) == NULL) return -1; data/bvi-1.4.0/set.c:238: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). value = atoi(str); data/bvi-1.4.0/set.c:263:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value = atoi(str); data/bvi-1.4.0/set.c:271:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(undo_buf, start_addr, undo_count); data/bvi-1.4.0/bm_unix.c:266:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(2, &cha, 1) <= 0) { data/bvi-1.4.0/bmore.c:133:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(helppath, HELPFILE, MAXCMD - 1); data/bvi-1.4.0/bmore.c:142:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (poi) strncpy(progname, ++poi, 9); data/bvi-1.4.0/bmore.c:143:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(progname, argv[0], 9); data/bvi-1.4.0/bmore.c:487:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch1 = getc(help_file)) != EOF) data/bvi-1.4.0/bmore.c:564: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). i = strlen(sstring); data/bvi-1.4.0/bmore.c:722:23: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (cnt == 0) return fgetc(curr_file); data/bvi-1.4.0/bvi.c:135:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (poi) strncpy(progname, ++poi, 7); data/bvi-1.4.0/bvi.c:136:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). else strncpy(progname, argv[0], 7); data/bvi-1.4.0/bvi.c:198: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(cmdstr, "$"); data/bvi-1.4.0/bvi.c:423: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). if (strlen(cmdstr)) data/bvi-1.4.0/bvi.c:634:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(rep_buf)) { data/bvi-1.4.0/bvi.c:973:3: [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(rep_buf, "\n"); data/bvi-1.4.0/bvi.c:986:3: [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(rep_buf, "\n"); data/bvi-1.4.0/comm.c:114:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(cmdline) > CMDSZ - 2) { data/bvi-1.4.0/comm.c:199:3: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/bvi-1.4.0/comm.c:220: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). len = strlen(cmdname); data/bvi-1.4.0/comm.c:364:22: [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. if (n == curfile) strcat(string, "["); data/bvi-1.4.0/comm.c:366:22: [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. if (n == curfile) strcat(string, "]"); data/bvi-1.4.0/comm.c:367: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(string, " "); data/bvi-1.4.0/comm.c:474: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 (c_argc > 1 || (strlen(c_argv[0]) > 1)) { emsg(extra); return; } data/bvi-1.4.0/dosio.c:250:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((n = read(fd, mem + filesize, chunk)) == 0xffff) { data/bvi-1.4.0/dosio.c:274:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((n = read(fd, mem + filesize, chunk)) == 0xffff) { data/bvi-1.4.0/dosio.c:329:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((n = read(fd, mem + filesize, chunk)) == 0xffff) { data/bvi-1.4.0/edit.c:84: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). len = strlen(rep_buf); data/bvi-1.4.0/edit.c:327: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(rep_buf); data/bvi-1.4.0/edit.c:736: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). string = malloc((size_t)strlen(fname) + MAXCMD); data/bvi-1.4.0/edit.c:887: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). len = strlen(arg); data/bvi-1.4.0/edit.c:928: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). while (isspace(cmdstr[strlen(cmdstr) - 1])) data/bvi-1.4.0/edit.c:929: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). cmdstr[strlen(cmdstr) - 1] = '\0'; data/bvi-1.4.0/io.c:80: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). string = malloc((size_t)strlen(fname) + MAXCMD); data/bvi-1.4.0/io.c:247: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). string = malloc((size_t)strlen(fname) + MAXCMD); data/bvi-1.4.0/io.c:261:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((filesize = read(fd, mem, block_size)) == 0) { data/bvi-1.4.0/io.c:278:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, mem, filesize) != filesize) { data/bvi-1.4.0/io.c:347:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(rcpath, getenv("HOME"), MAXCMD - 8); data/bvi-1.4.0/io.c:419:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(s) + 1; data/bvi-1.4.0/io.c:478:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, mem + filesize, buf.st_size) == -1) { data/bvi-1.4.0/recomp.c:229: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). end = poi + strlen(poi); data/bvi-1.4.0/set.c:89:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(arg, s, strlen(s)) == 0) /* matched full name */ data/bvi-1.4.0/set.c:92:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(arg, s, strlen(s)) == 0) /* matched short name */ data/bvi-1.4.0/set.c:97:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (arg[strlen(s)] == '?') { data/bvi-1.4.0/set.c:117: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). if (arg[strlen(s)] != '=' || state == FALSE) { data/bvi-1.4.0/set.c:123:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = arg + strlen(s) + 1; data/bvi-1.4.0/set.c:149: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). if (arg[strlen(s)] == '=') { data/bvi-1.4.0/set.c:217: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(fbuf) - 1; data/bvi-1.4.0/set.c:244: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(str) == 8) { data/bvi-1.4.0/set.c:256: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 (n = 0; n < strlen(str); n++) { data/bvi-1.4.0/set.c:327: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). i = strlen(p) - 1; ANALYSIS SUMMARY: Hits = 278 Lines analyzed = 7314 in approximately 0.21 seconds (35202 lines/second) Physical Source Lines of Code (SLOC) = 5966 Hits@level = [0] 25 [1] 48 [2] 132 [3] 9 [4] 86 [5] 3 Hits@level+ = [0+] 303 [1+] 278 [2+] 230 [3+] 98 [4+] 89 [5+] 3 Hits/KSLOC@level+ = [0+] 50.7878 [1+] 46.5974 [2+] 38.5518 [3+] 16.4264 [4+] 14.9179 [5+] 0.502849 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.