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/beav-1.40/amiga.c Examining data/beav-1.40/basic.c Examining data/beav-1.40/cinfo.c Examining data/beav-1.40/ebcdic.c Examining data/beav-1.40/echo.c Examining data/beav-1.40/spawn.c Examining data/beav-1.40/termcap.c Examining data/beav-1.40/termcap.h Examining data/beav-1.40/ttyio.c Examining data/beav-1.40/wangpc.c Examining data/beav-1.40/buffer.c Examining data/beav-1.40/def.h Examining data/beav-1.40/display.c Examining data/beav-1.40/english.c Examining data/beav-1.40/extend.c Examining data/beav-1.40/file.c Examining data/beav-1.40/fileio.c Examining data/beav-1.40/format.c Examining data/beav-1.40/kbd.c Examining data/beav-1.40/language.c Examining data/beav-1.40/line.c Examining data/beav-1.40/main.c Examining data/beav-1.40/prototyp.h Examining data/beav-1.40/random.c Examining data/beav-1.40/region.c Examining data/beav-1.40/search.c Examining data/beav-1.40/symbol.c Examining data/beav-1.40/tcap.c Examining data/beav-1.40/termio.c Examining data/beav-1.40/text.c Examining data/beav-1.40/tty.c Examining data/beav-1.40/ttykbd.c Examining data/beav-1.40/window.c Examining data/beav-1.40/word.c FINAL RESULTS: data/beav-1.40/basic.c:520:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (buf, MSG_lX, &index); data/beav-1.40/basic.c:523:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (buf, MSG_lO, &index); data/beav-1.40/basic.c:529:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (buf, MSG_lD, &index); data/beav-1.40/buffer.c:384: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 (blistp->b_fname, MSG_up_arrow); data/beav-1.40/buffer.c:566: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 (bp->b_fname, MSG_null); data/beav-1.40/buffer.c:567: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 (bp->b_bname, bname); data/beav-1.40/buffer.c:706:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_ins_cnt, R_POS_FMT (curwp)); data/beav-1.40/buffer.c:707:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, cnt); data/beav-1.40/buffer.c:737: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 (curbp->b_bname, bname); data/beav-1.40/buffer.c:951: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 (sav_buf.b_bname, MSG_save_buf); data/beav-1.40/display.c:345:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (vp->v_text, MSG_11lX, row_offst); /* to vid buf */ data/beav-1.40/display.c:349:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (vp->v_text, MSG_11lo, row_offst); /* to vid buf */ data/beav-1.40/display.c:356:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (vp->v_text, MSG_11ld, row_offst); /* to vid buf */ data/beav-1.40/display.c:431:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[ data/beav-1.40/display.c:442:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[k++]], MSG_06o, temp_int); data/beav-1.40/display.c:452:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[k++]], MSG_011lo, temp_long); data/beav-1.40/display.c:464:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[i]], MSG_03u, 0xff & bin_buf[i]); data/beav-1.40/display.c:474:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[k++]], MSG_05u, temp_int); data/beav-1.40/display.c:483:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[k++]], MSG_010lu, temp_long); data/beav-1.40/display.c:500:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[k++]], MSG_106e, temp_d); data/beav-1.40/display.c:522:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[k++]], MSG_116e, temp_d); data/beav-1.40/display.c:539:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[posn[i]], MSG_02X, 0xff & bin_buf[i]); data/beav-1.40/display.c:548:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[ data/beav-1.40/display.c:558:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&txt_buf[ data/beav-1.40/display.c:984:2: [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 (ERR_disp_3); data/beav-1.40/display.c:986:2: [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 (ERR_disp_4); data/beav-1.40/display.c:1267:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_curs_asc, posn); data/beav-1.40/display.c:1270:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_curs_ebc, posn); data/beav-1.40/display.c:1273:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_curs_hex, posn, u_posn); data/beav-1.40/display.c:1276:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_curs_bin, posn, u_posn); data/beav-1.40/display.c:1279:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_curs_dec, posn, u_posn); data/beav-1.40/display.c:1284:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_curs_flt, posn, u_posn); data/beav-1.40/display.c:1287:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_curs_oct, posn, u_posn); data/beav-1.40/display.c:1312:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_siz_8); data/beav-1.40/display.c:1315:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_siz_16); data/beav-1.40/display.c:1318:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_siz_32); data/beav-1.40/display.c:1321:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_siz_64); data/beav-1.40/display.c:1331:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_siz_null); data/beav-1.40/display.c:1341:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_int_shift, wp->w_disp_shift); data/beav-1.40/display.c:1343:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (posn_buf, MSG_mot_shift, wp->w_disp_shift); data/beav-1.40/display.c:1440:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_print1, fname); data/beav-1.40/display.c:1474:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_print2, R_POS_FMT (curwp)); data/beav-1.40/display.c:1475:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, (long) nline); data/beav-1.40/ebcdic.c:60:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, ERR_ebcdic, R_BYTE_FMT (curwp)); data/beav-1.40/ebcdic.c:61:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, ch); data/beav-1.40/echo.c:443: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 (ch, buf); data/beav-1.40/echo.c:444:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (ch, MSG_hit_key); data/beav-1.40/extend.c:70: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 (xname2, xname); data/beav-1.40/extend.c:138:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_unbd, b); data/beav-1.40/extend.c:143:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_bnd_to, b, sp->s_name); data/beav-1.40/extend.c:224:12: [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 (blistp->b_fname, MSG_null); data/beav-1.40/extend.c:228:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_wall_head); data/beav-1.40/extend.c:333: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 (&rc_name[1], MSG_beavrc); data/beav-1.40/extend.c:338: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 (&rc_name[strlen (rc_name)], term); data/beav-1.40/extend.c:346: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 (&rc_name[1], MSG_beavrc); data/beav-1.40/extend.c:350: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 (rc_name, MSG_beavrc); data/beav-1.40/extend.c:357: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 (&rc_name[1], MSG_beavrc); data/beav-1.40/extend.c:367: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 (&rc_name[3], MSG_beavrc); data/beav-1.40/extend.c:394:3: [4] (buffer) sscanf: 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. sscanf (buffr, "%s %s %x", funcname, keybind, &keyval); data/beav-1.40/extend.c:407:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (temp_b, "%s %s", MSG_unk_rc, keybind); data/beav-1.40/extend.c:454: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 (fspec, home); data/beav-1.40/extend.c:457:6: [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 (fspec, fname); data/beav-1.40/extend.c:491:6: [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 (fspec, fname); data/beav-1.40/file.c:77: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 (bname, curbp->b_bname); /* save current buffer */ data/beav-1.40/file.c:338: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 (bp->b_fname, MSG_null); data/beav-1.40/file.c:344:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (buf, NCOL, MSG_reading, fname); /* jam */ data/beav-1.40/file.c:349:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, ERR_f_size, R_POS_FMT (curwp)); data/beav-1.40/file.c:350:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, temp); data/beav-1.40/file.c:396:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_read_lx, R_POS_FMT (curwp)); data/beav-1.40/file.c:397:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, (ulong) byte_cnt); data/beav-1.40/file.c:416:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_read_lx, R_POS_FMT (curwp)); data/beav-1.40/file.c:417:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, byte_cnt); data/beav-1.40/file.c:423:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_no_mem_rd); data/beav-1.40/file.c:515: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 (curbp->b_fname, fname); data/beav-1.40/file.c:617:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, ERR_f_size, R_POS_FMT (curwp)); data/beav-1.40/file.c:618:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, temp); data/beav-1.40/file.c:622:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_writing, fn); /* jam */ data/beav-1.40/file.c:657:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_wrot_n, R_POS_FMT (curwp)); data/beav-1.40/file.c:658:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, (ulong) nbytes); data/beav-1.40/file.c:678:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_wrot_n, R_POS_FMT (curwp)); data/beav-1.40/file.c:679:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, (long) nbytes); data/beav-1.40/file.c:720: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 (curbp->b_fname, fname); /* Fix name. */ data/beav-1.40/file.c:759:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (fmt, "%s %s %s", "%s", R_POS_FMT (curwp), R_POS_FMT (curwp)); data/beav-1.40/file.c:763:5: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (fn, fmt, buf, start, end); data/beav-1.40/file.c:779:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, ERR_parse_fn, R_POS_FMT (curwp), R_POS_FMT (curwp)); data/beav-1.40/file.c:780:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, *start, *end); data/beav-1.40/file.c:793: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 (fn, buf); data/beav-1.40/fileio.c:272: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 (backup, source); data/beav-1.40/fileio.c:277:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (backname, MSG_bak); data/beav-1.40/fileio.c:279:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_backup, fname, backname); data/beav-1.40/fileio.c:288:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_back_er, fname, backname); data/beav-1.40/kbd.c:112:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&cp[strlen (cp)], MSG_fn); data/beav-1.40/kbd.c:122:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&cp[strlen (cp)], MSG_esc); data/beav-1.40/kbd.c:124:6: [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 (cp, np); data/beav-1.40/kbd.c:134:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&cp[strlen (cp)], MSG_ctl_x); data/beav-1.40/kbd.c:141:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&cp[strlen (cp)], MSG_esc); data/beav-1.40/kbd.c:162:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&cp[strlen (cp)], MSG_ctl); data/beav-1.40/kbd.c:180:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (cp, np); data/beav-1.40/line.c:55:2: [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 (ERR_no_alloc); data/beav-1.40/line.c:60:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_cnt_alloc, R_POS_FMT (curwp)); data/beav-1.40/line.c:61:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, (A32) size); data/beav-1.40/line.c:94:2: [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 (ERR_db_dalloc); data/beav-1.40/main.c:120: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 (bname, MSG_main); /* Get buffer name. */ data/beav-1.40/main.c:537:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, cp); data/beav-1.40/random.c:111:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_sh_pos, R_POS_FMT (curwp), R_POS_FMT (curwp), data/beav-1.40/random.c:113:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, dotoff, markoff, bsize, fsize); data/beav-1.40/random.c:118:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_sh_pos1, R_POS_FMT (curwp), R_POS_FMT (curwp), data/beav-1.40/random.c:120:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, dotoff, bsize, fsize); data/beav-1.40/random.c:123:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (&buf[strlen (buf)], MSG_f_str, curbp->b_fname); data/beav-1.40/random.c:486:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (text_buf, MSG_03u, (int) (edt_buf[0] & 0xff)); data/beav-1.40/random.c:492:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (text_buf, MSG_3u, &i); /* convert back to binary */ data/beav-1.40/random.c:498:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (text_buf, MSG_05u, (int) (l_val & 0xFFFF)); data/beav-1.40/random.c:504:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (text_buf, MSG_5u, &temp_int); data/beav-1.40/random.c:511:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (text_buf, MSG_010lu, l_val); data/beav-1.40/random.c:517:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (text_buf, MSG_lu, &l_val); data/beav-1.40/random.c:572:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (text_buf, MSG_116e, d_val); data/beav-1.40/random.c:584:10: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf (text_buf, MSG_116e, &d_temp) != 1) data/beav-1.40/random.c:590:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (temp_text, MSG_116e, d_temp); data/beav-1.40/random.c:597:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf (text_buf, MSG_116e, &d_val); data/beav-1.40/random.c:1268:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_procing, R_POS_FMT (curwp)); data/beav-1.40/random.c:1269:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, (ulong) i); data/beav-1.40/random.c:1311:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_lnk, curwp->w_bufp->b_bname, MSG_unlink); data/beav-1.40/random.c:1316:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_lnk, curwp->w_bufp->b_bname, MSG_link); data/beav-1.40/random.c:1332:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_bad_key); data/beav-1.40/random.c:1411:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_procing, R_POS_FMT (curwp)); data/beav-1.40/random.c:1412:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, dotp); data/beav-1.40/random.c:1493:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_procing, R_POS_FMT (src_wp)); data/beav-1.40/random.c:1494:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, DOT_POS (src_wp)); data/beav-1.40/region.c:88:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_procing, R_POS_FMT (curwp)); data/beav-1.40/region.c:89:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, DOT_POS (curwp)); data/beav-1.40/region.c:172: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 (oldbufn, curbp->b_bname); data/beav-1.40/search.c:119:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_pat_fnd, R_POS_FMT (curwp)); data/beav-1.40/search.c:120:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, curwp->w_dotp->l_file_offset + data/beav-1.40/search.c:158:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_pat_fnd, R_POS_FMT (curwp)); data/beav-1.40/search.c:159:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, curwp->w_dotp->l_file_offset + data/beav-1.40/search.c:194:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_pat_fnd, R_POS_FMT (curwp)); data/beav-1.40/search.c:195:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, curwp->w_dotp->l_file_offset + data/beav-1.40/search.c:214:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_pat_fnd, R_POS_FMT (curwp)); data/beav-1.40/search.c:215:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, curwp->w_dotp->l_file_offset + data/beav-1.40/search.c:289:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_fnd_at, R_POS_FMT (curwp)); data/beav-1.40/search.c:290:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, DOT_POS (curwp)); data/beav-1.40/search.c:376:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_n_rpl, R_POS_FMT (curwp)); data/beav-1.40/search.c:377:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, (ulong) rcnt); data/beav-1.40/search.c:415:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_srcing, R_POS_FMT (curwp)); data/beav-1.40/search.c:416:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, DOT_POS (curwp)); data/beav-1.40/search.c:492:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_srcing, R_POS_FMT (curwp)); data/beav-1.40/search.c:493:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, DOT_POS (curwp)); data/beav-1.40/search.c:616:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_curs, cur_prompt, R_BYTE_FMT (curwp), data/beav-1.40/search.c:618:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (disp_buf, buf1, curwp->w_doto, data/beav-1.40/search.c:708:7: [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 (ERR_rdpat); data/beav-1.40/search.c:799:6: [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 (ERR_mask, cur_pat->l_used, cur_mask->l_used); data/beav-1.40/search.c:818:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_curs, cur_prompt, R_BYTE_FMT (curwp), data/beav-1.40/search.c:820:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (disp_buf, buf1, curwp->w_doto, data/beav-1.40/search.c:958:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_cmping, R_POS_FMT (curwp)); data/beav-1.40/search.c:959:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, DOT_POS (curwp)); data/beav-1.40/spawn.c:46: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 (prompt_line, MSG_pmpt); data/beav-1.40/spawn.c:48: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 (old_prompt, pspec); data/beav-1.40/spawn.c:49:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (prompt_line, pspec); data/beav-1.40/symbol.c:520:2: [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 (MSG_no_f_tb, name); data/beav-1.40/tcap.c:84:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (err_str, "Unknown terminal type %s!\n", tv_stype); data/beav-1.40/termcap.c:127: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(bp,cp); data/beav-1.40/ttykbd.c:410:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, MSG_sp_key, i); data/beav-1.40/window.c:299:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf1, MSG_no_splt, R_BYTE_FMT (curwp)); data/beav-1.40/window.c:300:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, buf1, curwp->w_ntrows); data/beav-1.40/window.c:517:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "%s [%d] ", MSG_scrn_rows, nrow); data/beav-1.40/extend.c:318:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv (); data/beav-1.40/extend.c:335: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) data/beav-1.40/extend.c:445:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv (); data/beav-1.40/extend.c:450:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. home = getenv ("HOME"); data/beav-1.40/extend.c:476:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = getenv ("PATH"); data/beav-1.40/main.c:96: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. extern char *getenv (); data/beav-1.40/main.c:141:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. check_extend (getenv (MSG_prog_name)); data/beav-1.40/spawn.c:36:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv (); data/beav-1.40/spawn.c:47: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. pspec = getenv (MSG_pt); data/beav-1.40/spawn.c:61:29: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!cspec && !(cspec = getenv (MSG_shell))) /* jam */ data/beav-1.40/tcap.c:60:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv (); data/beav-1.40/tcap.c:71: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 ((tv_stype = getenv ("TERM")) == NULL) data/beav-1.40/termcap.c:118: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 ((cp = getenv("TERMCAP")) != NULL) { data/beav-1.40/termcap.c:125: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 ((ncp = getenv("TERM")) != NULL) { data/beav-1.40/amiga.c:74: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 scrbuf[SCRBUFSIZ]; /* buffered screen io */ data/beav-1.40/amiga.c:155:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char Buffer[8], ri = 0, wi = 0; data/beav-1.40/amiga.c:512:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char BlkBuf[BLOCKSIZE]; data/beav-1.40/amiga.c:514:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((sfd = open (SPath, O_RDONLY)) == -1) data/beav-1.40/amiga.c:516:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((dfd = open (DPath, O_WRONLY | O_CREAT | O_TRUNC)) == -1) data/beav-1.40/basic.c:506:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/beav-1.40/buffer.c:60:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bufn[NBUFN]; data/beav-1.40/buffer.c:73:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bufn[NBUFN]; data/beav-1.40/buffer.c:167:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bufn[NBUFN]; data/beav-1.40/buffer.c:376:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[8 + 1]; data/beav-1.40/buffer.c:377:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[128]; data/beav-1.40/buffer.c:406:2: [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 (b, "%8lx", nbytes); /* 8 digit buffer size. */ data/beav-1.40/buffer.c:663:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bufn[NBUFN]; data/beav-1.40/buffer.c:678:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NFILEN], buf1[NFILEN]; data/beav-1.40/buffer.c:730:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bname[NBUFN + 1]; data/beav-1.40/buffer.c:783:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char num[10]; data/beav-1.40/buffer.c:792: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 (num, "%lx", (long) n + 1); data/beav-1.40/buffer.c:808:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[NBUFN + 1]; data/beav-1.40/buffer.c:809:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3]; data/beav-1.40/cinfo.c:18: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 cinfo[256] = data/beav-1.40/def.h:440:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b_fname[NFILEN]; /* File name */ data/beav-1.40/def.h:441:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b_bname[NBUFN]; /* Buffer name */ data/beav-1.40/display.c:115:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char v_text[NCOL]; /* The actual characters. */ data/beav-1.40/display.c:290:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char w_buf[128]; /* temp buffer for data */ data/beav-1.40/display.c:1148:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char posn_buf[30] = data/beav-1.40/display.c:1414:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/display.c:1416:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NFILEN], buf1[NFILEN]; data/beav-1.40/ebcdic.c:53:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/echo.c:49:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL]; data/beav-1.40/echo.c:441:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ch[NCOL * 2]; data/beav-1.40/extend.c:50:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char xname[NXNAME]; data/beav-1.40/extend.c:52:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char xname2[NXNAME]; data/beav-1.40/extend.c:106:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char xname[NXNAME]; data/beav-1.40/extend.c:129:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[20]; data/beav-1.40/extend.c:130:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[80]; data/beav-1.40/extend.c:218:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/beav-1.40/extend.c:253: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 (&buf[HKEYCODE], "%4X", key); data/beav-1.40/extend.c:316:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rc_name[NFILEN]; /* fixed up name of rc file */ data/beav-1.40/extend.c:320:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char funcname[NXNAME + 1]; data/beav-1.40/extend.c:321:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keybind[NXNAME + 1]; data/beav-1.40/extend.c:377:18: [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 ((bindf = fopen (fname, "r"))) data/beav-1.40/extend.c:379: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 buffr[80]; data/beav-1.40/extend.c:405: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 temp_b[40]; data/beav-1.40/extend.c:444:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fspec[NFILEN * 2]; /* full path spec to search */ data/beav-1.40/extend.c:460: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 ((bindf = fopen (fspec, "r"))) data/beav-1.40/extend.c:469:18: [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 ((bindf = fopen (fname, "r"))) data/beav-1.40/extend.c:494: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 ((bindf = fopen (fspec, "r"))) data/beav-1.40/extend.c:516:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/file.c:54:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/file.c:73:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bname[NBUFN], fname[NFILEN]; data/beav-1.40/file.c:132:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/file.c:149:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/file.c:169:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/file.c:191:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bname[NBUFN]; data/beav-1.40/file.c:319:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/file.c:504:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/file.c:609:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/file.c:708:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[NFILEN]; data/beav-1.40/file.c:755:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NFILEN], buf1[NCOL], fmt[NCOL]; data/beav-1.40/fileio.c:47:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ffp = fopen (fn, "rb")) == NULL) /* pvr */ data/beav-1.40/fileio.c:50: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 ((ffp = open (fn, O_RDONLY | O_BINARY)) == -1) /* pvr */ data/beav-1.40/fileio.c:53: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 ((ffp = open (fn, O_RDONLY)) == -1) /* pvr */ data/beav-1.40/fileio.c:57: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 ((ffp = open (fn, O_RDONLY)) == -1) /* pvr */ data/beav-1.40/fileio.c:107:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ffp = fopen (fn, "wb")) == NULL) /* pvr */ data/beav-1.40/fileio.c:112:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ffp = open (fn, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, mode)) == -1) data/beav-1.40/fileio.c:116: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 ((ffp = open (fn, O_WRONLY | O_CREAT, mode)) == -1) data/beav-1.40/fileio.c:121: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 ((ffp = open (fn, O_WRONLY | O_CREAT, mode)) == -1) /* pvr */ data/beav-1.40/fileio.c:253:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char backname[NFILEN]; data/beav-1.40/fileio.c:255:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[NCOL]; data/beav-1.40/fileio.c:275: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 (backup, ".bak"); data/beav-1.40/kbd.c:99:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nbuf[3]; data/beav-1.40/kbd.c:113:2: [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 (&cp[strlen (cp)], "%c", k & KCHAR); data/beav-1.40/line.c:52:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/main.c:112:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bname[NBUFN]; data/beav-1.40/main.c:534:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL]; data/beav-1.40/main.c:564:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL]; data/beav-1.40/main.c:569:6: [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). n = atoi (buf); data/beav-1.40/random.c:93:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL * 2], buf1[NCOL * 2]; data/beav-1.40/random.c:145:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char b_per_u, f_buf[4], s_buf[4], i; data/beav-1.40/random.c:267:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char edt_buf[8], i_chr, b_per_u, u_offs, u_roffs, bit_shf, i; data/beav-1.40/random.c:273:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text_buf[32]; data/beav-1.40/random.c:544: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 temp_text[32]; data/beav-1.40/random.c:1254:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/random.c:1306:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL]; data/beav-1.40/random.c:1329:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL]; data/beav-1.40/random.c:1334:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (&buf[strlen (buf)], ", %X", key); data/beav-1.40/random.c:1352:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/random.c:1438:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/region.c:64:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/region.c:158:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bufn[NBUFN]; data/beav-1.40/region.c:159:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char oldbufn[NBUFN]; data/beav-1.40/search.c:67: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 srch_patb[MAX_PAT]; data/beav-1.40/search.c:68: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 srch_maskb[MAX_PAT]; data/beav-1.40/search.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 rplc_patb[MAX_PAT]; data/beav-1.40/search.c:70: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 rplc_maskb[MAX_PAT]; data/beav-1.40/search.c:98:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/search.c:138:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/search.c:175:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/search.c:260:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/search.c:400:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/search.c:471:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/search.c:545:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char disp_buf[180], mask_buf[180], buf1[NCOL]; data/beav-1.40/search.c:939:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/spawn.c:37:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char old_prompt[NCOL]; data/beav-1.40/spawn.c:38:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prompt_line[NCOL]; data/beav-1.40/tcap.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 tcapbuf[TCAPSLEN]; data/beav-1.40/tcap.c:62:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tcbuf[1024]; data/beav-1.40/tcap.c:64:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char err_str[NCOL]; data/beav-1.40/termcap.c:121:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(cp,"r")) != NULL) { data/beav-1.40/termcap.c:135:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[128]; data/beav-1.40/termcap.c:143:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return(fopen(path,"r")); data/beav-1.40/termcap.c:312: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 output[64]; /* Converted string */ data/beav-1.40/termcap.c:347:2: [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(out,"%d",args[pcount++]); data/beav-1.40/termcap.c:351:2: [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(out,"%02d",args[pcount++]); data/beav-1.40/termcap.c:355:2: [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(out,"%03d",args[pcount++]); data/beav-1.40/termio.c:249: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_io_buffer[2048]; data/beav-1.40/ttykbd.c:392:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL]; data/beav-1.40/ttykbd.c:416:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL]; data/beav-1.40/wangpc.c:47:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ret_str[6]; data/beav-1.40/window.c:295:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NCOL], buf1[NCOL]; data/beav-1.40/window.c:511:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[80]; data/beav-1.40/amiga.c:518:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((Bytes = read (sfd, BlkBuf, BLOCKSIZE)) > 0) data/beav-1.40/buffer.c:453:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ntext = strlen (text); data/beav-1.40/extend.c:250: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). cp1 = &buf[strlen (buf)]; data/beav-1.40/extend.c:332:2: [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 (&rc_name[0], "."); data/beav-1.40/extend.c:337:6: [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 (&rc_name[strlen (rc_name)], "."); data/beav-1.40/extend.c:337: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). strcpy (&rc_name[strlen (rc_name)], "."); data/beav-1.40/extend.c:338: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). strcpy (&rc_name[strlen (rc_name)], term); data/beav-1.40/extend.c:345:6: [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 (&rc_name[0], "."); data/beav-1.40/extend.c:455: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 (fspec[strlen (fspec) - 1] != '/') data/beav-1.40/extend.c:456: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 (fspec, "/"); data/beav-1.40/file.c:334:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (bp->b_fname, fname, NFILEN); data/beav-1.40/file.c:767: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). for (i_cnt = strlen (fn) - 1; i_cnt >= 0; i_cnt--) data/beav-1.40/fileio.c:200:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *rbuf = read (ffp, buf, nbuf); data/beav-1.40/fileio.c:203:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *rbuf = read (ffp, buf, nbuf); data/beav-1.40/fileio.c:273:5: [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 (backup, "~"); data/beav-1.40/kbd.c:112: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). sprintf (&cp[strlen (cp)], MSG_fn); data/beav-1.40/kbd.c:113: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). sprintf (&cp[strlen (cp)], "%c", k & KCHAR); data/beav-1.40/kbd.c:122: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). sprintf (&cp[strlen (cp)], MSG_esc); data/beav-1.40/kbd.c:127: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). cp[strlen (cp)] = 0;/* null string */ data/beav-1.40/kbd.c:134: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). sprintf (&cp[strlen (cp)], MSG_ctl_x); data/beav-1.40/kbd.c:141: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). sprintf (&cp[strlen (cp)], MSG_esc); data/beav-1.40/kbd.c:162:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf (&cp[strlen (cp)], MSG_ctl); data/beav-1.40/random.c:123: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). sprintf (&buf[strlen (buf)], MSG_f_str, curbp->b_fname); data/beav-1.40/random.c:1333: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). keyname (&buf[strlen (buf)], key); data/beav-1.40/random.c:1334: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). sprintf (&buf[strlen (buf)], ", %X", key); data/beav-1.40/search.c:622: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). siz_prompt2 = strlen (disp_buf); /* save prompt length for later */ data/beav-1.40/search.c:824: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). siz_prompt2 = strlen (disp_buf); /* save prompt length for later */ data/beav-1.40/spawn.c:50: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 (prompt_line - strlen (MSG_pme)) >= 64) data/beav-1.40/spawn.c:50: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 (strlen (prompt_line - strlen (MSG_pme)) >= 64) data/beav-1.40/termcap.c:68: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). numch = strlen(bp); data/beav-1.40/termcap.c:100: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 (bp[strlen(bp)-1] != '\n') { data/beav-1.40/termcap.c:348: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). out = &output[strlen(output)]; data/beav-1.40/termcap.c:352: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). out = &output[strlen(output)]; data/beav-1.40/termcap.c:356: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). out = &output[strlen(output)]; data/beav-1.40/termio.c:344:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (0, &kbdq, 1); data/beav-1.40/termio.c:349:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read (0, &kbdq, 1) != 1) data/beav-1.40/termio.c:390:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). kbdqp = (1 == read (0, &kbdq, 1)); ANALYSIS SUMMARY: Hits = 337 Lines analyzed = 15398 in approximately 0.43 seconds (36129 lines/second) Physical Source Lines of Code (SLOC) = 11574 Hits@level = [0] 17 [1] 37 [2] 121 [3] 14 [4] 165 [5] 0 Hits@level+ = [0+] 354 [1+] 337 [2+] 300 [3+] 179 [4+] 165 [5+] 0 Hits/KSLOC@level+ = [0+] 30.5858 [1+] 29.117 [2+] 25.9202 [3+] 15.4657 [4+] 14.2561 [5+] 0 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.