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/vim-8.2.1913/pixmaps/stock_icons.h Examining data/vim-8.2.1913/runtime/doc/doctags.c Examining data/vim-8.2.1913/runtime/macros/maze/maze.c Examining data/vim-8.2.1913/runtime/macros/maze/mazeansi.c Examining data/vim-8.2.1913/runtime/macros/maze/mazeclean.c Examining data/vim-8.2.1913/runtime/tools/blink.c Examining data/vim-8.2.1913/runtime/tools/ccfilter.c Examining data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c Examining data/vim-8.2.1913/src/GvimExt/gvimext.cpp Examining data/vim-8.2.1913/src/GvimExt/gvimext.h Examining data/vim-8.2.1913/src/GvimExt/resource.h Examining data/vim-8.2.1913/src/VisVim/Commands.cpp Examining data/vim-8.2.1913/src/VisVim/Commands.h Examining data/vim-8.2.1913/src/VisVim/DSAddIn.cpp Examining data/vim-8.2.1913/src/VisVim/DSAddIn.h Examining data/vim-8.2.1913/src/VisVim/OleAut.cpp Examining data/vim-8.2.1913/src/VisVim/OleAut.h Examining data/vim-8.2.1913/src/VisVim/Reg.cpp Examining data/vim-8.2.1913/src/VisVim/Resource.h Examining data/vim-8.2.1913/src/VisVim/StdAfx.cpp Examining data/vim-8.2.1913/src/VisVim/StdAfx.h Examining data/vim-8.2.1913/src/VisVim/VisVim.cpp Examining data/vim-8.2.1913/src/VisVim/VisVim.h Examining data/vim-8.2.1913/src/alloc.h Examining data/vim-8.2.1913/src/arabic.c Examining data/vim-8.2.1913/src/arglist.c Examining data/vim-8.2.1913/src/ascii.h Examining data/vim-8.2.1913/src/autocmd.c Examining data/vim-8.2.1913/src/beval.c Examining data/vim-8.2.1913/src/beval.h Examining data/vim-8.2.1913/src/blob.c Examining data/vim-8.2.1913/src/blowfish.c Examining data/vim-8.2.1913/src/buffer.c Examining data/vim-8.2.1913/src/bufwrite.c Examining data/vim-8.2.1913/src/change.c Examining data/vim-8.2.1913/src/channel.c Examining data/vim-8.2.1913/src/charset.c Examining data/vim-8.2.1913/src/cindent.c Examining data/vim-8.2.1913/src/clientserver.c Examining data/vim-8.2.1913/src/clipboard.c Examining data/vim-8.2.1913/src/cmdexpand.c Examining data/vim-8.2.1913/src/cmdhist.c Examining data/vim-8.2.1913/src/crypt.c Examining data/vim-8.2.1913/src/crypt_zip.c Examining data/vim-8.2.1913/src/debugger.c Examining data/vim-8.2.1913/src/dict.c Examining data/vim-8.2.1913/src/diff.c Examining data/vim-8.2.1913/src/digraph.c Examining data/vim-8.2.1913/src/dlldata.c Examining data/vim-8.2.1913/src/dosinst.c Examining data/vim-8.2.1913/src/dosinst.h Examining data/vim-8.2.1913/src/drawline.c Examining data/vim-8.2.1913/src/drawscreen.c Examining data/vim-8.2.1913/src/edit.c Examining data/vim-8.2.1913/src/errors.h Examining data/vim-8.2.1913/src/eval.c Examining data/vim-8.2.1913/src/evalbuffer.c Examining data/vim-8.2.1913/src/evalfunc.c Examining data/vim-8.2.1913/src/evalvars.c Examining data/vim-8.2.1913/src/evalwindow.c Examining data/vim-8.2.1913/src/ex_cmdidxs.h Examining data/vim-8.2.1913/src/ex_cmds.c Examining data/vim-8.2.1913/src/ex_cmds.h Examining data/vim-8.2.1913/src/ex_cmds2.c Examining data/vim-8.2.1913/src/ex_docmd.c Examining data/vim-8.2.1913/src/ex_eval.c Examining data/vim-8.2.1913/src/ex_getln.c Examining data/vim-8.2.1913/src/feature.h Examining data/vim-8.2.1913/src/fileio.c Examining data/vim-8.2.1913/src/filepath.c Examining data/vim-8.2.1913/src/findfile.c Examining data/vim-8.2.1913/src/fold.c Examining data/vim-8.2.1913/src/getchar.c Examining data/vim-8.2.1913/src/glbl_ime.cpp Examining data/vim-8.2.1913/src/glbl_ime.h Examining data/vim-8.2.1913/src/globals.h Examining data/vim-8.2.1913/src/gui.c Examining data/vim-8.2.1913/src/gui.h Examining data/vim-8.2.1913/src/gui_at_fs.c Examining data/vim-8.2.1913/src/gui_at_sb.c Examining data/vim-8.2.1913/src/gui_at_sb.h Examining data/vim-8.2.1913/src/gui_athena.c Examining data/vim-8.2.1913/src/gui_beval.c Examining data/vim-8.2.1913/src/gui_dwrite.cpp Examining data/vim-8.2.1913/src/gui_dwrite.h Examining data/vim-8.2.1913/src/gui_gtk.c Examining data/vim-8.2.1913/src/gui_gtk_f.c Examining data/vim-8.2.1913/src/gui_gtk_f.h Examining data/vim-8.2.1913/src/gui_gtk_vms.h Examining data/vim-8.2.1913/src/gui_gtk_x11.c Examining data/vim-8.2.1913/src/gui_haiku.cc Examining data/vim-8.2.1913/src/gui_haiku.h Examining data/vim-8.2.1913/src/gui_motif.c Examining data/vim-8.2.1913/src/gui_photon.c Examining data/vim-8.2.1913/src/gui_w32.c Examining data/vim-8.2.1913/src/gui_w32_rc.h Examining data/vim-8.2.1913/src/gui_x11.c Examining data/vim-8.2.1913/src/gui_x11_pm.h Examining data/vim-8.2.1913/src/gui_xim.c Examining data/vim-8.2.1913/src/gui_xmdlg.c Examining data/vim-8.2.1913/src/gui_xmebw.c Examining data/vim-8.2.1913/src/gui_xmebw.h Examining data/vim-8.2.1913/src/gui_xmebwp.h Examining data/vim-8.2.1913/src/hardcopy.c Examining data/vim-8.2.1913/src/hashtab.c Examining data/vim-8.2.1913/src/help.c Examining data/vim-8.2.1913/src/highlight.c Examining data/vim-8.2.1913/src/if_cscope.c Examining data/vim-8.2.1913/src/if_cscope.h Examining data/vim-8.2.1913/src/if_lua.c Examining data/vim-8.2.1913/src/if_mzsch.c Examining data/vim-8.2.1913/src/if_mzsch.h Examining data/vim-8.2.1913/src/if_ole.cpp Examining data/vim-8.2.1913/src/if_ole.h Examining data/vim-8.2.1913/src/if_perl_msvc/stdbool.h Examining data/vim-8.2.1913/src/if_perlsfio.c Examining data/vim-8.2.1913/src/if_py_both.h Examining data/vim-8.2.1913/src/if_python.c Examining data/vim-8.2.1913/src/if_python3.c Examining data/vim-8.2.1913/src/if_ruby.c Examining data/vim-8.2.1913/src/if_tcl.c Examining data/vim-8.2.1913/src/if_xcmdsrv.c Examining data/vim-8.2.1913/src/iid_ole.c Examining data/vim-8.2.1913/src/indent.c Examining data/vim-8.2.1913/src/insexpand.c Examining data/vim-8.2.1913/src/iscygpty.c Examining data/vim-8.2.1913/src/iscygpty.h Examining data/vim-8.2.1913/src/job.c Examining data/vim-8.2.1913/src/json.c Examining data/vim-8.2.1913/src/json_test.c Examining data/vim-8.2.1913/src/keymap.h Examining data/vim-8.2.1913/src/kword_test.c Examining data/vim-8.2.1913/src/libvterm/include/vterm.h Examining data/vim-8.2.1913/src/libvterm/include/vterm_keycodes.h Examining data/vim-8.2.1913/src/libvterm/src/encoding.c Examining data/vim-8.2.1913/src/libvterm/src/keyboard.c Examining data/vim-8.2.1913/src/libvterm/src/mouse.c Examining data/vim-8.2.1913/src/libvterm/src/parser.c Examining data/vim-8.2.1913/src/libvterm/src/pen.c Examining data/vim-8.2.1913/src/libvterm/src/rect.h Examining data/vim-8.2.1913/src/libvterm/src/screen.c Examining data/vim-8.2.1913/src/libvterm/src/state.c Examining data/vim-8.2.1913/src/libvterm/src/unicode.c Examining data/vim-8.2.1913/src/libvterm/src/utf8.h Examining data/vim-8.2.1913/src/libvterm/src/vterm.c Examining data/vim-8.2.1913/src/libvterm/src/vterm_internal.h Examining data/vim-8.2.1913/src/libvterm/t/harness.c Examining data/vim-8.2.1913/src/list.c Examining data/vim-8.2.1913/src/locale.c Examining data/vim-8.2.1913/src/macros.h Examining data/vim-8.2.1913/src/map.c Examining data/vim-8.2.1913/src/mark.c Examining data/vim-8.2.1913/src/match.c Examining data/vim-8.2.1913/src/mbyte.c Examining data/vim-8.2.1913/src/memfile.c Examining data/vim-8.2.1913/src/memfile_test.c Examining data/vim-8.2.1913/src/memline.c Examining data/vim-8.2.1913/src/menu.c Examining data/vim-8.2.1913/src/message.c Examining data/vim-8.2.1913/src/message_test.c Examining data/vim-8.2.1913/src/misc1.c Examining data/vim-8.2.1913/src/misc2.c Examining data/vim-8.2.1913/src/mouse.c Examining data/vim-8.2.1913/src/move.c Examining data/vim-8.2.1913/src/nbdebug.c Examining data/vim-8.2.1913/src/nbdebug.h Examining data/vim-8.2.1913/src/netbeans.c Examining data/vim-8.2.1913/src/normal.c Examining data/vim-8.2.1913/src/ops.c Examining data/vim-8.2.1913/src/option.c Examining data/vim-8.2.1913/src/option.h Examining data/vim-8.2.1913/src/optiondefs.h Examining data/vim-8.2.1913/src/optionstr.c Examining data/vim-8.2.1913/src/os_amiga.c Examining data/vim-8.2.1913/src/os_amiga.h Examining data/vim-8.2.1913/src/os_dos.h Examining data/vim-8.2.1913/src/os_haiku.h Examining data/vim-8.2.1913/src/os_mac.h Examining data/vim-8.2.1913/src/os_mac_conv.c Examining data/vim-8.2.1913/src/os_mswin.c Examining data/vim-8.2.1913/src/os_qnx.c Examining data/vim-8.2.1913/src/os_qnx.h Examining data/vim-8.2.1913/src/os_unix.c Examining data/vim-8.2.1913/src/os_unixx.h Examining data/vim-8.2.1913/src/os_vms.c Examining data/vim-8.2.1913/src/os_vms_conf.h Examining data/vim-8.2.1913/src/os_vms_mms.c Examining data/vim-8.2.1913/src/os_w32dll.c Examining data/vim-8.2.1913/src/os_w32exe.c Examining data/vim-8.2.1913/src/os_win32.c Examining data/vim-8.2.1913/src/os_win32.h Examining data/vim-8.2.1913/src/po/sjiscorr.c Examining data/vim-8.2.1913/src/popupmenu.c Examining data/vim-8.2.1913/src/popupwin.c Examining data/vim-8.2.1913/src/profiler.c Examining data/vim-8.2.1913/src/proto.h Examining data/vim-8.2.1913/src/protodef.h Examining data/vim-8.2.1913/src/pty.c Examining data/vim-8.2.1913/src/quickfix.c Examining data/vim-8.2.1913/src/regexp.c Examining data/vim-8.2.1913/src/regexp.h Examining data/vim-8.2.1913/src/regexp_bt.c Examining data/vim-8.2.1913/src/regexp_nfa.c Examining data/vim-8.2.1913/src/register.c Examining data/vim-8.2.1913/src/screen.c Examining data/vim-8.2.1913/src/scriptfile.c Examining data/vim-8.2.1913/src/search.c Examining data/vim-8.2.1913/src/session.c Examining data/vim-8.2.1913/src/sha256.c Examining data/vim-8.2.1913/src/sign.c Examining data/vim-8.2.1913/src/sound.c Examining data/vim-8.2.1913/src/spell.c Examining data/vim-8.2.1913/src/spell.h Examining data/vim-8.2.1913/src/spellfile.c Examining data/vim-8.2.1913/src/spellsuggest.c Examining data/vim-8.2.1913/src/syntax.c Examining data/vim-8.2.1913/src/tag.c Examining data/vim-8.2.1913/src/tee/tee.c Examining data/vim-8.2.1913/src/term.c Examining data/vim-8.2.1913/src/term.h Examining data/vim-8.2.1913/src/terminal.c Examining data/vim-8.2.1913/src/termlib.c Examining data/vim-8.2.1913/src/testing.c Examining data/vim-8.2.1913/src/textformat.c Examining data/vim-8.2.1913/src/textobject.c Examining data/vim-8.2.1913/src/textprop.c Examining data/vim-8.2.1913/src/time.c Examining data/vim-8.2.1913/src/typval.c Examining data/vim-8.2.1913/src/ui.c Examining data/vim-8.2.1913/src/undo.c Examining data/vim-8.2.1913/src/uninstall.c Examining data/vim-8.2.1913/src/usercmd.c Examining data/vim-8.2.1913/src/userfunc.c Examining data/vim-8.2.1913/src/version.c Examining data/vim-8.2.1913/src/version.h Examining data/vim-8.2.1913/src/vim.h Examining data/vim-8.2.1913/src/vim9.h Examining data/vim-8.2.1913/src/vim9compile.c Examining data/vim-8.2.1913/src/vim9execute.c Examining data/vim-8.2.1913/src/vim9script.c Examining data/vim-8.2.1913/src/vim9type.c Examining data/vim-8.2.1913/src/viminfo.c Examining data/vim-8.2.1913/src/vimrun.c Examining data/vim-8.2.1913/src/winclip.c Examining data/vim-8.2.1913/src/window.c Examining data/vim-8.2.1913/src/xdiff/xdiff.h Examining data/vim-8.2.1913/src/xdiff/xdiffi.c Examining data/vim-8.2.1913/src/xdiff/xdiffi.h Examining data/vim-8.2.1913/src/xdiff/xemit.c Examining data/vim-8.2.1913/src/xdiff/xemit.h Examining data/vim-8.2.1913/src/xdiff/xhistogram.c Examining data/vim-8.2.1913/src/xdiff/xinclude.h Examining data/vim-8.2.1913/src/xdiff/xmacros.h Examining data/vim-8.2.1913/src/xdiff/xpatience.c Examining data/vim-8.2.1913/src/xdiff/xprepare.c Examining data/vim-8.2.1913/src/xdiff/xprepare.h Examining data/vim-8.2.1913/src/xdiff/xtypes.h Examining data/vim-8.2.1913/src/xdiff/xutils.c Examining data/vim-8.2.1913/src/xdiff/xutils.h Examining data/vim-8.2.1913/src/xpm/include/simx.h Examining data/vim-8.2.1913/src/xpm/include/xpm.h Examining data/vim-8.2.1913/src/xpm_w32.c Examining data/vim-8.2.1913/src/xpm_w32.h Examining data/vim-8.2.1913/src/xxd/xxd.c Examining data/vim-8.2.1913/src/main.c Examining data/vim-8.2.1913/src/os_unix.h Examining data/vim-8.2.1913/src/structs.h FINAL RESULTS: data/vim-8.2.1913/src/filepath.c:1918:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. len = readlink((char *)p, (char *)buf, MAXPATHL); data/vim-8.2.1913/src/main.c:3612:11: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. len = readlink(PROC_EXE_LINK, linkbuf, MAXPATHL); data/vim-8.2.1913/src/memline.c:4309:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink((char *)tmp, (char *)buf, MAXPATHL - 1); data/vim-8.2.1913/src/os_unix.c:2784:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return (chmod((char *) data/vim-8.2.1913/runtime/macros/maze/maze.c:1:46: [4] (buffer) scanf: 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. char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C); data/vim-8.2.1913/runtime/macros/maze/maze.c:5:21: [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. ) ; Z || printf (M ))M[Z]=Z[A-(E =A[J-Z])&&!C data/vim-8.2.1913/runtime/macros/maze/mazeansi.c:5:21: [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. ) ; Z || printf (T ))T[Z]=Z[A-(E =A[J-Z])&&!C data/vim-8.2.1913/runtime/macros/maze/mazeclean.c:15:63: [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. for (; (A -= Z = !Z) || (printf ("\n|"), A = 39, C--); Z || printf (T)) data/vim-8.2.1913/runtime/tools/ccfilter.c:91:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf( stderr, USAGE ); data/vim-8.2.1913/runtime/tools/ccfilter.c:101:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, szError); data/vim-8.2.1913/runtime/tools/ccfilter.c:254: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( Reason, p ); data/vim-8.2.1913/runtime/tools/ccfilter.c:259: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( Line, Line2 ); data/vim-8.2.1913/runtime/tools/ccfilter.c:295: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( Line, Line2 ); data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:176:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(property, "%c%c%c-n %s%c-s %s", data/vim-8.2.1913/src/GvimExt/gvimext.cpp:65: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(name, searchpath((char *)"gvim.exe")); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:72: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(name, searchpath((char *)"gvim.bat")); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:112: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(buf, searchpath(buf)); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:293: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(szLang, szBuff); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:320: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(szLang, szBuff); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:955:6: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(cmdStrW, m_szFileUserClickedOn); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:1044:2: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(cmdStrW, m_szFileUserClickedOn); data/vim-8.2.1913/src/VisVim/Commands.cpp:696:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(VimCmd, ":cd %s%s%s\n", Drive, DirUnix, data/vim-8.2.1913/src/VisVim/Commands.cpp:707:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(Buf, Msg, Arg); data/vim-8.2.1913/src/VisVim/DSAddIn.cpp:146:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (Msg, "Unexpected error (Error code: %lx)\n%s", Err, Buf); data/vim-8.2.1913/src/VisVim/DSAddIn.cpp:157:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (Msg, "Unexpected error\n%s failed", Fct); data/vim-8.2.1913/src/VisVim/OleAut.cpp:409:2: [4] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. lstrcpy((char*)ErrName, (char*)#sc); \ data/vim-8.2.1913/src/VisVim/OleAut.cpp:657:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (Buf, "An OLE error occurred:\r\nCode = %s\r\nResult = %lx.", data/vim-8.2.1913/src/autocmd.c:2286:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)*sourcing_namep, s, data/vim-8.2.1913/src/channel.c:222:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(log_fd, fmt, ap); data/vim-8.2.1913/src/channel.c:234:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))) data/vim-8.2.1913/src/channel.c:247:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(log_fd, fmt, ap); data/vim-8.2.1913/src/clientserver.c:777:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)str, PRINTF_HEX_LONG_U, (long_u)w); data/vim-8.2.1913/src/clientserver.c:852: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((const char *)serverid, SCANF_HEX_LONG_U, &n); data/vim-8.2.1913/src/clientserver.c:904:2: [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((char *)serverid, SCANF_HEX_LONG_U, &n); data/vim-8.2.1913/src/dosinst.c:209:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s\\filetype.vim", installdir); data/vim-8.2.1913/src/dosinst.c:310: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(tmpname, cp); data/vim-8.2.1913/src/dosinst.c:313: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(tmpname, 0) == 0) data/vim-8.2.1913/src/dosinst.c:363: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(default_bat_dir, targets[i].oldbat); data/vim-8.2.1913/src/dosinst.c:393: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(buf, vim); data/vim-8.2.1913/src/dosinst.c:466: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(vimrt_dir, uninst_exe); data/vim-8.2.1913/src/dosinst.c:476:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(temp_uninst, "%s\\vimun%04X.exe", temp_dir, data/vim-8.2.1913/src/dosinst.c:488:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "\"%s\" /S _?=%s", temp_uninst, vimrt_dir); data/vim-8.2.1913/src/dosinst.c:490:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s /S _?=%s", temp_uninst, vimrt_dir); data/vim-8.2.1913/src/dosinst.c:580: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(default_vim_dir, temp_string_buffer); data/vim-8.2.1913/src/dosinst.c:624:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "\"%s\"", temp_string_buffer); data/vim-8.2.1913/src/dosinst.c:626:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, temp_string_buffer); data/vim-8.2.1913/src/dosinst.c:721: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(buf, installdir); data/vim-8.2.1913/src/dosinst.c:785: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(oldvimrc, installdir); data/vim-8.2.1913/src/dosinst.c:844:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, VIMBAT_UNINSTKEY "\n"); data/vim-8.2.1913/src/dosinst.c:927:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(choices[idx].text, fmt, arg); data/vim-8.2.1913/src/dosinst.c:942: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(batname, oldname); data/vim-8.2.1913/src/dosinst.c:958: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(batpath, name); data/vim-8.2.1913/src/dosinst.c:1018:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(names[0], "Select directory to create %s in:", name); data/vim-8.2.1913/src/dosinst.c:1023:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(names[count], "Do not create a %s file.", name); data/vim-8.2.1913/src/dosinst.c:1037: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(batpath, names[n]); data/vim-8.2.1913/src/dosinst.c:1076: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(targets[i].batpath, targets[0].batpath); data/vim-8.2.1913/src/dosinst.c:1111: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(batpath, default_bat_dir); data/vim-8.2.1913/src/dosinst.c:1118: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(batpath, p); data/vim-8.2.1913/src/dosinst.c:1358: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(vimrc, installdir); data/vim-8.2.1913/src/dosinst.c:1452:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(subkey, "CLSID\\%s", clsid); data/vim-8.2.1913/src/dosinst.c:1456:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(subkey, "CLSID\\%s\\InProcServer32", clsid); data/vim-8.2.1913/src/dosinst.c:1513:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(exe_cmd, "\"%s\" \"%%1\"", exe_path); data/vim-8.2.1913/src/dosinst.c:1588:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vim_exe_path, "%s\\gvim.exe", installdir); data/vim-8.2.1913/src/dosinst.c:1600:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(bufg, "%s\\" GVIMEXT32_PATH, installdir); data/vim-8.2.1913/src/dosinst.c:1605:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(bufg, "%s\\" GVIMEXT64_PATH, installdir); data/vim-8.2.1913/src/dosinst.c:1640:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(display_name, "Vim " VIM_VERSION_SHORT data/vim-8.2.1913/src/dosinst.c:1650:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(uninstall_string, "%s\\uninstall.exe", installdir); data/vim-8.2.1913/src/dosinst.c:1652:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir); data/vim-8.2.1913/src/dosinst.c:1654:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(icon_string, "%s\\gvim.exe,0", installdir); data/vim-8.2.1913/src/dosinst.c:1849:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(link_path, "%s\\%s.lnk", shell_folder_path, link_name); data/vim-8.2.1913/src/dosinst.c:1865:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(executable_path, "%s\\%s", installdir, exename); data/vim-8.2.1913/src/dosinst.c:2092:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(register_command_string, "\"%s\\gvim.exe\" -silent -register", installdir); data/vim-8.2.1913/src/dosinst.c:2093:5: [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(register_command_string); data/vim-8.2.1913/src/dosinst.c:2174:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%s", homedrive, homepath); data/vim-8.2.1913/src/dosinst.c:2202:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%s", exp, p + 1); data/vim-8.2.1913/src/dosinst.c:2261: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(vimdir_path, p); data/vim-8.2.1913/src/dosinst.c:2273: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(vimdir_path, p); data/vim-8.2.1913/src/dosinst.c:2285:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vimfiles_path, "%s\\vimfiles", vimdir_path); data/vim-8.2.1913/src/dosinst.c:2291:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_dirname, "%s\\%s", vimfiles_path, vimfiles_subdirs[i]); data/vim-8.2.1913/src/dosinst.c:2320:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_dirname, "%s\\vimfiles\\compiler", p); data/vim-8.2.1913/src/dosinst.c:2331: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(tmp_dirname, p); data/vim-8.2.1913/src/dosinst.h:176: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(s, p); data/vim-8.2.1913/src/dosinst.h:292: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(tbuf, shell_folder_path); data/vim-8.2.1913/src/dosinst.h:313:2: [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(shell_folder_path, shell_folder_name + 8); data/vim-8.2.1913/src/dosinst.h:394:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd_buf, "%s /c start \"vimcmd\" /wait %s", cmd_path, cmd); data/vim-8.2.1913/src/dosinst.h:400:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd_buf, "start /w %s", cmd); data/vim-8.2.1913/src/dosinst.h:402:5: [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_buf); data/vim-8.2.1913/src/drawline.c:1095:4: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)extra, fmt, data/vim-8.2.1913/src/drawscreen.c:1176:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)buf, fmt, w, num); data/vim-8.2.1913/src/evalfunc.c:7714:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)pat2, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)", spat, epat); data/vim-8.2.1913/src/evalfunc.c:7718:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)pat3, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)\\|\\(%s\\m\\)", data/vim-8.2.1913/src/evalvars.c:2450:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)newval + STRLEN(newval), " ++ff=%s", data/vim-8.2.1913/src/evalvars.c:2455:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)newval + STRLEN(newval), " ++enc=%s", data/vim-8.2.1913/src/ex_cmds2.c:762:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "compiler/%s.vim", eap->arg); data/vim-8.2.1913/src/ex_docmd.c:8721:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)strbuf, PRINTF_HEX_LONG_U, data/vim-8.2.1913/src/ex_eval.c:483:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)(val + STRLEN(p)), " (%s)", &mesg[1]); data/vim-8.2.1913/src/fileio.c:2662:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)eap->cmd, "e ++enc=%s", buf->b_p_fenc); data/vim-8.2.1913/src/fileio.c:3053:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)p, NGETTEXT("%ld line, ", "%ld lines, ", lnum), lnum); data/vim-8.2.1913/src/fileio.c:4170:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(tbuf, mesg, path); data/vim-8.2.1913/src/fileio.c:5159:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)itmp, "%s%ld", vim_tempdir, temp_count++); data/vim-8.2.1913/src/fileio.c:5228:9: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). if (mktemp((char *)itmp) == NULL) data/vim-8.2.1913/src/fold.c:3758:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)r, txt, dashes, count); data/vim-8.2.1913/src/gui.c:999:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)wp, "%d%s", i * 2, p); data/vim-8.2.1913/src/gui_at_fs.c:232:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(SFcurrentDir, path); data/vim-8.2.1913/src/gui_at_fs.c:262: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). *s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2); data/vim-8.2.1913/src/gui_at_fs.c:286:9: [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). (void) strcat(SFcurrentPath, str); data/vim-8.2.1913/src/gui_at_fs.c:503:9: [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). (void) strcat(strcpy(entries[i].real, "~"), pw->pw_name); data/vim-8.2.1913/src/gui_at_fs.c:548:13: [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). (void) strcat(strcat(strcpy(SFcurrentPath, data/vim-8.2.1913/src/gui_at_fs.c:548:27: [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) strcat(strcat(strcpy(SFcurrentPath, data/vim-8.2.1913/src/gui_at_fs.c:1311: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). (void) strcpy(entry->shown, shown); data/vim-8.2.1913/src/gui_at_fs.c:2036: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). (void) strcat(strcpy(result[i].real, str), " "); data/vim-8.2.1913/src/gui_at_fs.c:2568: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(SFcurrentPath, SFstartDir); data/vim-8.2.1913/src/gui_at_fs.c:2578:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(SFcurrentPath, SFtextBuffer); data/vim-8.2.1913/src/gui_at_fs.c:2583:9: [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). (void) strcat(strcpy(SFcurrentPath, SFstartDir), SFtextBuffer); data/vim-8.2.1913/src/gui_at_fs.c:2583: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). (void) strcat(strcpy(SFcurrentPath, SFstartDir), SFtextBuffer); data/vim-8.2.1913/src/gui_at_fs.c:2682: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). (void)strcpy(SFcurrentDir, SFstartDir); data/vim-8.2.1913/src/gui_at_fs.c:2688: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(SFcurrentPath, init_path); data/vim-8.2.1913/src/gui_at_fs.c:2696:12: [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). (void)strcat(strcpy(SFcurrentPath, SFstartDir), init_path); data/vim-8.2.1913/src/gui_at_fs.c:2696: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). (void)strcat(strcpy(SFcurrentPath, SFstartDir), init_path); data/vim-8.2.1913/src/gui_at_fs.c:2701: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). (void)strcpy(SFcurrentPath, SFstartDir); data/vim-8.2.1913/src/gui_w32.c:3167:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)p, "%s:h%d", font_name, points); data/vim-8.2.1913/src/gui_w32.c:3169:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)p, "%s:h%d:W%ld", font_name, points, lf.lfWeight); data/vim-8.2.1913/src/gui_w32.c:6666:23: [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). #define add_string(s) strcpy((LPSTR)p, s); (LPSTR)p += (strlen((LPSTR)p) + 1) data/vim-8.2.1913/src/gui_w32.c:7110:6: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(p, lfSysmenu.lfFaceName); data/vim-8.2.1913/src/gui_w32.c:7348:6: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(lpWCStr, wn); data/vim-8.2.1913/src/gui_w32.c:7695:6: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(p, lfSysmenu.lfFaceName); data/vim-8.2.1913/src/gui_xim.c:55:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fd, s, arglist); data/vim-8.2.1913/src/gui_xim.c:1395: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(tmp, gui.rsrc_input_method); data/vim-8.2.1913/src/gui_xim.c:1410: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(buf, s); data/vim-8.2.1913/src/gui_xim.c:1462:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp, gui.rsrc_preedit_type_name); data/vim-8.2.1913/src/gui_xmdlg.c:192: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(buf, buf3); data/vim-8.2.1913/src/gui_xmdlg.c:199: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(buf3, buf); data/vim-8.2.1913/src/gui_xmdlg.c:898: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(big_font, fn(data, idx)); data/vim-8.2.1913/src/hardcopy.c:804:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)IObuff, "%s", _("Printing aborted")); data/vim-8.2.1913/src/hardcopy.c:1456:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)prt_line_buffer, "%s ", (b ? "T" : "F")); data/vim-8.2.1913/src/hardcopy.c:1474:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)prt_line_buffer, "/%s %d %f /_%s sffs\n", data/vim-8.2.1913/src/help.c:1017:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)s, "help-tags\t%s\t1\n", tagfname); data/vim-8.2.1913/src/help.c:1105:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)s, "%s\t%s", p1, fname); data/vim-8.2.1913/src/highlight.c:486:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "colors/%s.vim", name); data/vim-8.2.1913/src/if_cscope.c:470:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. (void)sprintf(buf, stat_emsg, fname, errno); data/vim-8.2.1913/src/if_cscope.c:555:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(fname2, "/%s", CSCOPE_DBFILE); data/vim-8.2.1913/src/if_cscope.c:557:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(fname2, "%s/%s", fname, CSCOPE_DBFILE); data/vim-8.2.1913/src/if_cscope.c:769:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(cmd, "%d%s", search, pat); data/vim-8.2.1913/src/if_cscope.c:914:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(cmd, "exec %s -dl -f %s", prog, csinfo[i].fname); data/vim-8.2.1913/src/if_cscope.c:917:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(cmd, "%s -dl -f %s", prog, csinfo[i].fname); data/vim-8.2.1913/src/if_cscope.c:922:12: [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). (void)strcat(cmd, csinfo[i].ppath); data/vim-8.2.1913/src/if_cscope.c:927:12: [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). (void)strcat(cmd, csinfo[i].flags); data/vim-8.2.1913/src/if_cscope.c:945:6: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (execl("/bin/sh", "sh", "-c", cmd, (char *)NULL) == -1) data/vim-8.2.1913/src/if_cscope.c:1123:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, nf, *qfpos, *(qfpos-1)); data/vim-8.2.1913/src/if_cscope.c:1194:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, nf, opt, pat); data/vim-8.2.1913/src/if_cscope.c:1450: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). (void)strcpy(csinfo[i].fname, (const char *)fname); data/vim-8.2.1913/src/if_cscope.c:1459: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). (void)strcpy(csinfo[i].ppath, (const char *)ppath); data/vim-8.2.1913/src/if_cscope.c:1471: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). (void)strcpy(csinfo[i].flags, (const char *)flags); data/vim-8.2.1913/src/if_cscope.c:1633:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(buf, "%s\t%s\t%s;\"\t%s", tagstr, fname, slno, search); data/vim-8.2.1913/src/if_cscope.c:1641:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(buf, "%s\t%s\t%s;\"", tagstr, fname, slno); data/vim-8.2.1913/src/if_cscope.c:1821:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(context, "<<%s>>", cntx); data/vim-8.2.1913/src/if_cscope.c:1973: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(tbuf, matches[0]); data/vim-8.2.1913/src/if_cscope.c:1986:8: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. (void)sprintf(buf, cstag_msg, ptag); data/vim-8.2.1913/src/if_cscope.c:2006: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). (void)strcpy(tbuf, matches[idx]); data/vim-8.2.1913/src/if_cscope.c:2036:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. (void)sprintf(buf, csfmt_str, num, lno); data/vim-8.2.1913/src/if_cscope.c:2063:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. (void)sprintf(buf, cntxformat, context); data/vim-8.2.1913/src/if_cscope.c:2431:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name); data/vim-8.2.1913/src/if_ole.cpp:542: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(Key, clsid); data/vim-8.2.1913/src/if_ole.cpp:614: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(Key, clsid); data/vim-8.2.1913/src/if_ole.cpp:681:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, key); data/vim-8.2.1913/src/if_ole.cpp:687:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, subkey); data/vim-8.2.1913/src/if_ruby.c:1105: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, RSTRING_PTR(str)); data/vim-8.2.1913/src/if_tcl.c:1669: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(varname, VAR_RANGE1); data/vim-8.2.1913/src/if_tcl.c:1671: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(varname, VAR_RANGE2); data/vim-8.2.1913/src/if_tcl.c:1673: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(varname, VAR_RANGE3); data/vim-8.2.1913/src/if_tcl.c:1676: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(varname, VAR_LBASE); data/vim-8.2.1913/src/if_tcl.c:1680: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(tclinfo.curbuf, name); data/vim-8.2.1913/src/if_tcl.c:1681: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(varname, VAR_CURBUF); data/vim-8.2.1913/src/if_tcl.c:1685: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(tclinfo.curwin, name); data/vim-8.2.1913/src/if_tcl.c:1686: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(varname, VAR_CURWIN); data/vim-8.2.1913/src/if_tcl.c:1761: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(varname, VAR_LBASE); data/vim-8.2.1913/src/if_tcl.c:1766: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(varname, VAR_RANGE1); data/vim-8.2.1913/src/if_tcl.c:1768: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(varname, VAR_RANGE2); data/vim-8.2.1913/src/if_tcl.c:1771: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(varname, VAR_RANGE3); data/vim-8.2.1913/src/if_tcl.c:1778: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(tclinfo.curbuf, name); data/vim-8.2.1913/src/if_tcl.c:1779: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(varname, VAR_CURBUF); data/vim-8.2.1913/src/if_tcl.c:1782: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(tclinfo.curwin, name); data/vim-8.2.1913/src/if_tcl.c:1783: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(varname, VAR_CURWIN); data/vim-8.2.1913/src/if_tcl.c:1957: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(var_lnum, VAR_CURLNUM); data/vim-8.2.1913/src/if_tcl.c:1958: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(var_line, VAR_CURLINE); data/vim-8.2.1913/src/if_xcmdsrv.c:242:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)p, "%s%d", name, i++); data/vim-8.2.1913/src/if_xcmdsrv.c:446:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)property, "%c%c%c-n %s%c-E %s%c-s %s", data/vim-8.2.1913/src/if_xcmdsrv.c:754:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)property, "%cn%c-E %s%c-n %s%c-w %x", data/vim-8.2.1913/src/if_xcmdsrv.c:1319:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ", data/vim-8.2.1913/src/libvterm/src/vterm.c:170:9: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. len = vsprintf(buffer, format, args); data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:17:23: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define DEBUG_LOG(s) fprintf(stderr, s) data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:18:27: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define DEBUG_LOG1(s, a) fprintf(stderr, s, a) data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:19:30: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define DEBUG_LOG2(s, a, b) fprintf(stderr, s, a, b) data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:20:33: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define DEBUG_LOG3(s, a, b, c) fprintf(stderr, s, a, b, c) data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:283:20: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define VSNPRINTF vsnprintf data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:296:19: [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. # define SNPRINTF snprintf data/vim-8.2.1913/src/libvterm/t/harness.c:113:5: [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(i ? ",%x" : "%x", b); data/vim-8.2.1913/src/libvterm/t/harness.c:319:5: [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(i ? ",%x" : "%x", info->chars[i]); data/vim-8.2.1913/src/libvterm/t/harness.c:459:9: [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(col == rect.start_col ? "%02X" : " %02X", cell.chars[0]); data/vim-8.2.1913/src/libvterm/t/harness.c:690:11: [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(i ? ",%x" : "%x", cp[i]); data/vim-8.2.1913/src/libvterm/t/harness.c:1034:5: [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 ? "?\n" : "DONE\n"); data/vim-8.2.1913/src/macros.h:158:27: [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. # define mch_access(n, p) access(vms_fixfilename(n), (p)) data/vim-8.2.1913/src/macros.h:167:29: [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. # define mch_access(n, p) access((n), (p)) data/vim-8.2.1913/src/main.c:1753:11: [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. count = sscanf(&(argv[i + 1][2]), SCANF_HEX_LONG_U, &id); data/vim-8.2.1913/src/main.c:1755:11: [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. count = sscanf(argv[i + 1], SCANF_DECIMAL_LONG_U, &id); data/vim-8.2.1913/src/main.c:2388:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)p, "so %s", a); data/vim-8.2.1913/src/main.c:2614:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)p, ":%s\r", parmp->commands[0]); data/vim-8.2.1913/src/map.c:1981:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (fprintf(fd, IF_EB("\\\026\n", "\\" CTRL_V_STR "\n")) < 0) data/vim-8.2.1913/src/match.c:1088:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)buf, (char *)"pos%d", i); data/vim-8.2.1913/src/message.c:478:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)Buf, (char *)p, sname); data/vim-8.2.1913/src/message.c:504:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)Buf, (char *)p, (long)SOURCING_LNUM); data/vim-8.2.1913/src/message.c:4734:21: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. str_arg_l += sprintf(tmp + str_arg_l, f, ptr_arg); data/vim-8.2.1913/src/message.c:4756:32: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case '\0': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4760:31: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case 'h': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4764:31: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case 'l': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4767:31: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case 'L': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4777:32: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case '\0': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4781:31: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case 'h': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4785:31: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case 'l': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4788:31: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. case 'L': str_arg_l += sprintf( data/vim-8.2.1913/src/message.c:4932:20: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. str_arg_l = sprintf(tmp, format, f); data/vim-8.2.1913/src/misc1.c:1165:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)NameBuff, "%s%s", homedrive, homepath); data/vim-8.2.1913/src/misc1.c:1908:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)envbuf, "%s=%s", name, val); data/vim-8.2.1913/src/misc2.c:4030:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "%s", string); // copy into env. data/vim-8.2.1913/src/misc2.c:4077: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(elem, environ[i]); data/vim-8.2.1913/src/nbdebug.c:108:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(nb_debug, fmt, ap); data/vim-8.2.1913/src/nbdebug.c:123:4: [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. (access(buf, F_OK) == 0); data/vim-8.2.1913/src/nbdebug.c:125:4: [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. (access(buf, 0) == 0); data/vim-8.2.1913/src/nbdebug.h:47:26: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 1, 2))) data/vim-8.2.1913/src/netbeans.c:222:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "0:version=0 \"%s\"\n", ExtEdProtocolVersion); data/vim-8.2.1913/src/netbeans.c:802:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)reply, "%d %s\n", cmdno, (char *)result); data/vim-8.2.1913/src/netbeans.c:2325: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(&keybuf[i], tok); data/vim-8.2.1913/src/netbeans.c:2450: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(buf, name); data/vim-8.2.1913/src/netbeans.c:2754:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", data/vim-8.2.1913/src/netbeans.c:3186:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fgbuf, "guifg=%s ctermfg=%s", fg, fg); data/vim-8.2.1913/src/netbeans.c:3192:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(bgbuf, "guibg=%s ctermbg=%s", bg, bg); data/vim-8.2.1913/src/normal.c:2346:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)pat, vim_iswordp(ptr) ? "\\V\\<%.*s\\>" : "\\V%.*s", data/vim-8.2.1913/src/optionstr.c:152:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf_type, "%s", data/vim-8.2.1913/src/optionstr.c:191:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)errbuf, _("E539: Illegal character <%s>"), data/vim-8.2.1913/src/optionstr.c:1359:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errbuf, _("E526: Missing number after <%s>"), data/vim-8.2.1913/src/os_amiga.c:518:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf2, "newcli <nil: >nil: %s from %s", (char *)device, (char *)buf1); data/vim-8.2.1913/src/os_mswin.c:939:5: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(szBuff, pszFormat, args); data/vim-8.2.1913/src/os_mswin.c:2090:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)winstr, PRINTF_HEX_LONG_U, (long_u)sender); data/vim-8.2.1913/src/os_mswin.c:2351: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((char *)name, SCANF_HEX_LONG_U, &n); data/vim-8.2.1913/src/os_unix.c:1064:6: [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("xterm -e gdb -x "VI_GDB_FILE); data/vim-8.2.1913/src/os_unix.c:1107:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)IObuff, "Vim: Caught deadly signal %s\r\n", data/vim-8.2.1913/src/os_unix.c:2405:30: [4] (misc) cuserid: Exactly what cuserid() does is poorly defined (e.g., some systems use the effective uid, like Linux, while others like System V use the real uid). Thus, you can't trust what it does. It's certainly not portable (The cuserid function was included in the 1988 version of POSIX, but removed from the 1990 version). Also, if passed a non-null parameter, there's a risk of a buffer overflow if the passed-in buffer is not at least L_cuserid characters long (CWE-120). Use getpwuid(geteuid()) and extract the desired information instead. vim_strncpy(s, (char_u *)cuserid(NULL), len - 1); data/vim-8.2.1913/src/os_unix.c:4498:6: [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. x = system((char *)p_sh); data/vim-8.2.1913/src/os_unix.c:4516:10: [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. x = system((char *)cmd); data/vim-8.2.1913/src/os_unix.c:4525:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)newcmd, "%s %s %s %s", p_sh, data/vim-8.2.1913/src/os_unix.c:4529:10: [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. x = system((char *)newcmd); data/vim-8.2.1913/src/os_unix.c:4828:6: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/vim-8.2.1913/src/os_unix.c:5674:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argv[0], argv); data/vim-8.2.1913/src/os_vms.c:242: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((char *)cp, buffer); data/vim-8.2.1913/src/os_vms.c:250: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((char *)cp, sbuf); data/vim-8.2.1913/src/os_vms.c:584: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(out, in); // No - get rest of the spec data/vim-8.2.1913/src/os_vms.c:639: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(Fspec_Rms,fil); data/vim-8.2.1913/src/os_vms.c:664: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(tmpbuf, instring); data/vim-8.2.1913/src/os_vms.c:671: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(buf, instring); data/vim-8.2.1913/src/os_vms_mms.c:40: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(target, argp); data/vim-8.2.1913/src/os_vms_mms.c:45:5: [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/vim-8.2.1913/src/os_win32.c:4754:7: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(szShellTitle, wn); data/vim-8.2.1913/src/os_win32.c:7142:5: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(to_name, to); data/vim-8.2.1913/src/os_win32.c:7143:5: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(to_name, substream); data/vim-8.2.1913/src/os_win32.c:7589:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)envbuf, "%s=%s", var, value); data/vim-8.2.1913/src/os_win32.h:181:32: [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 TRACE 1 ? (void)0 : printf data/vim-8.2.1913/src/proto.h:125:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 1, 2))) data/vim-8.2.1913/src/proto.h:131:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))) data/vim-8.2.1913/src/proto.h:137:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))) data/vim-8.2.1913/src/proto.h:144:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 1, 2))) data/vim-8.2.1913/src/proto.h:151:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 1, 2))) data/vim-8.2.1913/src/proto.h:157:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 3, 4))) data/vim-8.2.1913/src/proto.h:163:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 3, 4))) data/vim-8.2.1913/src/proto.h:287:27: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))) data/vim-8.2.1913/src/pty.c:407:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(PtyName, PtyProto); data/vim-8.2.1913/src/pty.c:408:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(TtyName, TtyProto); data/vim-8.2.1913/src/quickfix.c:3240:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)IObuff, _("(%d of %d)%s%s: "), qf_index, data/vim-8.2.1913/src/quickfix.c:3561:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)IObuff + STRLEN(IObuff), "%s", data/vim-8.2.1913/src/quickfix.c:3960:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "%s %3d", (char *)p, nr); data/vim-8.2.1913/src/quickfix.c:4920:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)makecmd, data/vim-8.2.1913/src/screen.c:1765:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, IF_EB("\033|%dh", ESC_STR "|%dh"), attr); data/vim-8.2.1913/src/screen.c:1915:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, IF_EB("\033|%dH", ESC_STR "|%dH"), screen_attr); data/vim-8.2.1913/src/scriptfile.c:834:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat); data/vim-8.2.1913/src/scriptfile.c:848:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)s, "pack/*/start/*/%s/%s*.vim", dirnames[i], pat); data/vim-8.2.1913/src/scriptfile.c:863:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)s, "pack/*/opt/*/%s/%s*.vim", dirnames[i], pat); data/vim-8.2.1913/src/scriptfile.c:926:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)s, "pack/*/opt/%s*", pat); data/vim-8.2.1913/src/search.c:3385:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char *)pat, whole ? "\\<%.*s\\>" : "%.*s", len, ptr); data/vim-8.2.1913/src/session.c:224:20: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (count > 0 && (fprintf(fd, fr->fr_layout == FR_COL data/vim-8.2.1913/src/sign.c:1278:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname); data/vim-8.2.1913/src/spell.c:2876:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)frompat, "\\V\\<%s\\>", repl_from); data/vim-8.2.1913/src/spellfile.c:2744:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "^%s", items[4]); data/vim-8.2.1913/src/spellfile.c:2746:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "%s$", items[4]); data/vim-8.2.1913/src/spellfile.c:2805:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)buf, "^%s", data/vim-8.2.1913/src/spellsuggest.c:1762:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: split", data/vim-8.2.1913/src/spellsuggest.c:1765:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: compound", data/vim-8.2.1913/src/spellsuggest.c:1911:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: subst %c to %c", data/vim-8.2.1913/src/spellsuggest.c:1915:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: accept %c", data/vim-8.2.1913/src/spellsuggest.c:2050:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: delete %c", data/vim-8.2.1913/src/spellsuggest.c:2147:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: insert %c", data/vim-8.2.1913/src/spellsuggest.c:2247:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: swap %c and %c", data/vim-8.2.1913/src/spellsuggest.c:2335:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: swap3 %c and %c", data/vim-8.2.1913/src/spellsuggest.c:2403:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: rotate left %c%c%c", data/vim-8.2.1913/src/spellsuggest.c:2464:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: rotate right %c%c%c", data/vim-8.2.1913/src/spellsuggest.c:2576:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(changename[depth], "%.*s-%s: replace %s with %s", data/vim-8.2.1913/src/tag.c:720:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)IObuff, _("tag %d of %d%s"), data/vim-8.2.1913/src/tag.c:3571:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname); data/vim-8.2.1913/src/tag.c:3576:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(", data/vim-8.2.1913/src/term.c:2922:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, format, lead, tail); data/vim-8.2.1913/src/term.c:3847:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fd_tr, fmt, ap); data/vim-8.2.1913/src/term.c:6299:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(ksme_str, IF_EB("\033|%dm", ESC_STR "|%dm"), attr); data/vim-8.2.1913/src/term.c:6300:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(ksmd_str, IF_EB("\033|%dm", ESC_STR "|%dm"), data/vim-8.2.1913/src/term.c:6302:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(ksmr_str, IF_EB("\033|%dm", ESC_STR "|%dm"), data/vim-8.2.1913/src/terminal.c:4191:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)ea.cmd, "sbuf ++enc=%s", p); data/vim-8.2.1913/src/termlib.c:107:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tbuf, tmp); data/vim-8.2.1913/src/termlib.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(tbuf, tcap); data/vim-8.2.1913/src/termlib.c:614:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, fmt, val); data/vim-8.2.1913/src/uninstall.c:260:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s\\%s", path, filename); data/vim-8.2.1913/src/uninstall.c:363:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(icon, "%s\\%s", path, icon_link_names[i]); data/vim-8.2.1913/src/uninstall.c:404: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("gvim.exe -silent -unregister"); data/vim-8.2.1913/src/version.c:42: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(longVersion, VIM_VERSION_LONG_DATE); data/vim-8.2.1913/src/version.c:44: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(longVersion, BUILD_DATE); data/vim-8.2.1913/src/version.c:46: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(longVersion, __DATE__); data/vim-8.2.1913/src/version.c:48: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(longVersion, __TIME__); data/vim-8.2.1913/src/version.c:5211:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)vers + len, ".%d%s", highest_patch(), data/vim-8.2.1913/src/vim.h:1586:26: [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). #define STRCPY(d, s) strcpy((char *)(d), (char *)(s)) data/vim-8.2.1913/src/vim.h:1627:26: [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). #define STRCAT(d, s) strcat((char *)(d), (char *)(s)) data/vim-8.2.1913/src/vim9script.c:234:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)funcname + 3, "%ld_%s", (long)sid, name); data/vim-8.2.1913/src/viminfo.c:165:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, IF_EB("\026%d\n<", CTRL_V_STR "%d\n<"), len + 3); data/vim-8.2.1913/src/xxd/xxd.c:122:12: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int fprintf __P((FILE *, char *, ...)); data/vim-8.2.1913/src/xxd/xxd.c:405: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(z, l); data/vim-8.2.1913/src/xxd/xxd.c:755:8: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X", data/vim-8.2.1913/src/GvimExt/gvimext.cpp:214:16: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. hLibintlDLL = LoadLibrary(GETTEXT_DLL); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:217:20: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. hLibintlDLL = LoadLibrary(GETTEXT_DLL_ALT); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:299: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 (!gotlang && getenv("LANG") == NULL) data/vim-8.2.1913/src/diff.c:1142:6: [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 (getenv("DIFF_OPTIONS")) data/vim-8.2.1913/src/dosinst.c:390: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. vim = getenv("VIMRUNTIME"); data/vim-8.2.1913/src/dosinst.c:399: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. vim = getenv("VIM"); data/vim-8.2.1913/src/dosinst.c:715: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. p = getenv("VIM"); data/vim-8.2.1913/src/dosinst.c:737: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. p = getenv("VIMRUNTIME"); data/vim-8.2.1913/src/dosinst.c:983: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/vim-8.2.1913/src/dosinst.c:1116: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. p = getenv("WINDIR"); data/vim-8.2.1913/src/dosinst.c:1121:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("PATH"); data/vim-8.2.1913/src/dosinst.c:2155: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. var = getenv("HOME"); data/vim-8.2.1913/src/dosinst.c:2167: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. homedrive = getenv("HOMEDRIVE"); data/vim-8.2.1913/src/dosinst.c:2168: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. homepath = getenv("HOMEPATH"); data/vim-8.2.1913/src/dosinst.c:2181: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. var = getenv("USERPROFILE"); data/vim-8.2.1913/src/dosinst.c:2198: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. exp = getenv(buf); data/vim-8.2.1913/src/dosinst.c:2257: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. p = getenv("VIM"); data/vim-8.2.1913/src/dosinst.c:2316: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. p = getenv("HOME"); data/vim-8.2.1913/src/dosinst.c:2327:6: [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. p = getenv("VIM"); data/vim-8.2.1913/src/dosinst.h:507:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sysdrive = getenv("SYSTEMDRIVE"); data/vim-8.2.1913/src/fileio.c:5203:9: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). p = tmpnam((char *)itmp); data/vim-8.2.1913/src/fileio.c:5213:19: [3] (tmpfile) tempnam: Temporary file race condition (CWE-377). p = (char_u *)tempnam("tmp:", (char *)itmp); data/vim-8.2.1913/src/gui_gtk_x11.c:4211:21: [3] (random) g_random_int: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. (unsigned)g_random_int(), data/vim-8.2.1913/src/if_cscope.c:976:15: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. created = CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, data/vim-8.2.1913/src/if_cscope.c:976:15: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. created = CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, data/vim-8.2.1913/src/main.c:319: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. char *p = getenv("SESSION_MANAGER"); data/vim-8.2.1913/src/mbyte.c:4545: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. if ((s = getenv("LC_ALL")) == NULL || *s == NUL) data/vim-8.2.1913/src/mbyte.c:4546: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 ((s = getenv("LC_CTYPE")) == NULL || *s == NUL) data/vim-8.2.1913/src/mbyte.c:4547:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. s = getenv("LANG"); data/vim-8.2.1913/src/nbdebug.c:62:41: [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 (wait_flags & WT_ENV && wait_var && getenv(wait_var) != NULL) { data/vim-8.2.1913/src/nbdebug.c:63: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. sleep(atoi(getenv(wait_var))); data/vim-8.2.1913/src/nbdebug.c:82:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (log_var && (file = getenv(log_var)) != NULL) data/vim-8.2.1913/src/nbdebug.c:89:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (level_var && (cp = getenv(level_var)) != NULL) { data/vim-8.2.1913/src/netbeans.c:151:30: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (arg == NULL && (fname = getenv("__NETBEANS_CONINFO")) != NULL) data/vim-8.2.1913/src/netbeans.c:175: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. hostname = getenv("__NETBEANS_HOST"); data/vim-8.2.1913/src/netbeans.c:177: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. address = getenv("__NETBEANS_SOCKET"); data/vim-8.2.1913/src/netbeans.c:179: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. password = getenv("__NETBEANS_VIM_PASSWORD"); data/vim-8.2.1913/src/os_amiga.c:1641: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. retval = (char_u *)getenv((char *)var); data/vim-8.2.1913/src/os_mac.h:215:40: [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. # define mch_getenv(name) ((char_u *)getenv((char *)(name))) data/vim-8.2.1913/src/os_unix.c:1828:37: [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 (x11_window == 0 && (winid = getenv("WINDOWID")) != NULL) data/vim-8.2.1913/src/os_unix.c:2516:13: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. return (getwd((char *)buf) != NULL ? OK : FAIL); data/vim-8.2.1913/src/os_unix.c:3176:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = (char_u *)getenv("PATH"); data/vim-8.2.1913/src/os_unix.c:4063: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 ((p = (char_u *)getenv("LINES"))) data/vim-8.2.1913/src/os_unix.c:4065: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 ((p = (char_u *)getenv("COLUMNS"))) data/vim-8.2.1913/src/os_unix.c:5556: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. term = getenv("TERM"); data/vim-8.2.1913/src/os_unix.c:7627:33: [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 (x11_window == 0 && (strp = getenv("WINDOWID")) != NULL) data/vim-8.2.1913/src/os_unix.h:467:36: [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. # define mch_getenv(x) (char_u *)getenv((char *)(x)) data/vim-8.2.1913/src/os_vms.c:245:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if ((sbuf = getenv((char *)lognam))) data/vim-8.2.1913/src/os_win32.c:545:12: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. dll = LoadLibrary(name); data/vim-8.2.1913/src/os_win32.h:200:33: [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. #define mch_getenv(x) (char_u *)getenv((char *)(x)) data/vim-8.2.1913/src/sha256.c:409:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(get_some_time()); data/vim-8.2.1913/src/uninstall.c:48:15: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. advapi_lib = LoadLibrary("ADVAPI32.DLL"); data/vim-8.2.1913/runtime/doc/doctags.c:20: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[LINELEN]; data/vim-8.2.1913/runtime/doc/doctags.c:34:8: [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). fd = fopen(argv[0], "r"); data/vim-8.2.1913/runtime/tools/ccfilter.c:24: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 Line[LINELENGTH]; data/vim-8.2.1913/runtime/tools/ccfilter.c:25: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 Line2[LINELENGTH]; data/vim-8.2.1913/runtime/tools/ccfilter.c:27:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char FileName[1024]; data/vim-8.2.1913/runtime/tools/ccfilter.c:28: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 BasePath[1024]; data/vim-8.2.1913/runtime/tools/ccfilter.c:29: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 CWD[1024]; data/vim-8.2.1913/runtime/tools/ccfilter.c:33: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 Reason[LINELENGTH]; data/vim-8.2.1913/runtime/tools/ccfilter.c:253: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( Reason, ": " ); data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:108:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *property, staticSpace[STATIC_SPACE]; data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:183: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(property + length, "%c-r %x %d", 0, (uint) commWindow, serial); data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:386:6: [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(entry, p, count); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:74:6: [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(name, "gvim"); // finds gvim.bat or gvim.exe data/vim-8.2.1913/src/GvimExt/gvimext.cpp:83:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(name, " --literal"); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:275:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szBuff[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:276:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szLang[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:281:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(szLang, "LANG="); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:312: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(szBuff, "zh_TW"); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:315: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(szBuff, "zh_CN"); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:317: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(szBuff, "ja"); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:335:6: [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(szBuff + len, "lang"); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:720: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 title[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:721:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:867:2: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(pszName, _("Edits the selected file(s) with Vim")); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:874:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:899: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 vimExeFile[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:916: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 widename[2 * BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:917: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 location[2 * BUFSIZE + 2]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:921:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, (LPCSTR)name, -1, data/vim-8.2.1913/src/GvimExt/gvimext.cpp:939:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t m_szFileUserClickedOn[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:940:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t cmdStrW[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:951:2: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(cmdStrW, L" \""); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:1010:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t m_szFileUserClickedOn[BUFSIZE]; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:1023:2: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(cmdStrW, L" -d"); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:1043:2: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(cmdStrW, L" \""); data/vim-8.2.1913/src/VisVim/Commands.cpp:526: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 FileNameTmp[MAX_OLE_STR]; data/vim-8.2.1913/src/VisVim/Commands.cpp:527: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 VimCmd[MAX_OLE_STR]; data/vim-8.2.1913/src/VisVim/Commands.cpp:538: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(VimCmd + 2, ":up\n"); data/vim-8.2.1913/src/VisVim/Commands.cpp:551: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(VimCmd, ":tab drop "); data/vim-8.2.1913/src/VisVim/Commands.cpp:556: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(VimCmd, ":drop "); data/vim-8.2.1913/src/VisVim/Commands.cpp:559: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(FileNameTmp, "%S", (char *)FileName); data/vim-8.2.1913/src/VisVim/Commands.cpp:578: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(VimCmd, ":%ld\n", LineNr); data/vim-8.2.1913/src/VisVim/Commands.cpp:645:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char Buf[256]; data/vim-8.2.1913/src/VisVim/Commands.cpp:646:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(Buf, "There is no registered OLE automation server named " data/vim-8.2.1913/src/VisVim/Commands.cpp:670: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 Drive[_MAX_DRIVE]; data/vim-8.2.1913/src/VisVim/Commands.cpp:671: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 Dir[_MAX_DIR]; data/vim-8.2.1913/src/VisVim/Commands.cpp:672: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 DirUnix[_MAX_DIR * 2]; data/vim-8.2.1913/src/VisVim/Commands.cpp:694: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 VimCmd[MAX_OLE_STR]; data/vim-8.2.1913/src/VisVim/Commands.cpp:706: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[400]; data/vim-8.2.1913/src/VisVim/DSAddIn.cpp:140: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 Msg[512]; data/vim-8.2.1913/src/VisVim/DSAddIn.cpp:155: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 Msg[512]; data/vim-8.2.1913/src/VisVim/OleAut.cpp:414: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 ErrName[200]; data/vim-8.2.1913/src/VisVim/OleAut.cpp:653:3: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy (ErrName, "UNKNOWN SCODE"); data/vim-8.2.1913/src/VisVim/OleAut.cpp:656: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[256]; data/vim-8.2.1913/src/VisVim/OleAut.cpp:759: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 BufAscii[MAX_OLE_STR]; data/vim-8.2.1913/src/VisVim/OleAut.cpp:777:2: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar (CP_ACP, 0, sAscii, -1, BufUnicode, MAX_OLE_STR); data/vim-8.2.1913/src/autocmd.c:1106:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). buflocal_nr = atoi((char *)pat + 8); data/vim-8.2.1913/src/autocmd.c:1113: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((char *)buflocal_pat, "<buffer=%d>", buflocal_nr); data/vim-8.2.1913/src/blowfish.c:385: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(bk.uc, block, 8); data/vim-8.2.1913/src/blowfish.c:391: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(block, bk.uc, 8); data/vim-8.2.1913/src/blowfish.c:540: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(bk.uc, bf_test_data[i].plaintxt, 8); data/vim-8.2.1913/src/buffer.c:435: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((char *)buf->b_key, "%x", buf->b_fnum); data/vim-8.2.1913/src/buffer.c:2883: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((char *)key, "%x", nr); data/vim-8.2.1913/src/buffer.c:4509:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). num = atoi((char *)str); data/vim-8.2.1913/src/bufwrite.c:310:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). needed = MultiByteToWideChar(enc_codepage, data/vim-8.2.1913/src/bufwrite.c:316:16: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). needed = MultiByteToWideChar(enc_codepage, data/vim-8.2.1913/src/bufwrite.c:329:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). needed = MultiByteToWideChar(enc_codepage, MB_ERR_INVALID_CHARS, data/vim-8.2.1913/src/bufwrite.c:1210: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((char *)gettail(IObuff), "%d", i); data/vim-8.2.1913/src/channel.c:161:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen((char *)fname, *opt == 'w' ? "w" : "a"); data/vim-8.2.1913/src/channel.c:1000: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[NUMBUFLEN]; data/vim-8.2.1913/src/channel.c:1064: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((char *)&server.sin_addr, p, host->h_length); data/vim-8.2.1913/src/channel.c:1532:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)p, (char *)line, len); data/vim-8.2.1913/src/channel.c:3064:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[20]; // longest is "sock_timeout" data/vim-8.2.1913/src/channel.c:3890: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(b->bv_ga.ga_data, p, outlen); data/vim-8.2.1913/src/charset.c:1747:14: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). retval = atol((char *)p); data/vim-8.2.1913/src/cindent.c:1861:17: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fraction = atol((char *)++p); data/vim-8.2.1913/src/clientserver.c:445: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(ni.szTip, _("%d of %d edited"), count, numFiles); data/vim-8.2.1913/src/clientserver.c:461: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). j = atoi((char *)p); data/vim-8.2.1913/src/clientserver.c:466: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(ni.szTip, _("%d of %d edited"), data/vim-8.2.1913/src/cmdhist.c:746: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((char *)IObuff, "%c%6d ", i == idx ? '>' : ' ', data/vim-8.2.1913/src/crypt.c:304:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char magic_buffer[CRYPT_MAGIC_LEN]; data/vim-8.2.1913/src/debugger.c:328:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). level = atoi((char *)arg); data/vim-8.2.1913/src/debugger.c:738:7: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). nr = atol((char *)eap->arg); data/vim-8.2.1913/src/diff.c:2635:10: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atol((char *)eap->arg); data/vim-8.2.1913/src/dosinst.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 oldvimrc[BUFSIZE]; // name of existing vimrc file data/vim-8.2.1913/src/dosinst.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 vimrc[BUFSIZE]; // name of vimrc file to create data/vim-8.2.1913/src/dosinst.c:161:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dummy[100]; data/vim-8.2.1913/src/dosinst.c:190:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:220:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = fopen("gvim.exe", "r")) != NULL) data/vim-8.2.1913/src/dosinst.c:225:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = fopen("vim.exe", "r")) != NULL) data/vim-8.2.1913/src/dosinst.c:385:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:387:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:416:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fname, "vimini.ini"); data/vim-8.2.1913/src/dosinst.c:418:10: [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). fd = fopen(fname, "w"); data/vim-8.2.1913/src/dosinst.c:444:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char title[256]; data/vim-8.2.1913/src/dosinst.c:459:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vimrt_dir[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:460:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_uninst[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:461:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_dir[MAX_PATH]; data/vim-8.2.1913/src/dosinst.c:462:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE * 2 + 10]; data/vim-8.2.1913/src/dosinst.c:507:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subkey_name_buff[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:508:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_string_buffer[BUFSIZE-2]; data/vim-8.2.1913/src/dosinst.c:621:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:704:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:786:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(oldvimrc + runtimeidx, "_vimrc"); data/vim-8.2.1913/src/dosinst.c:787:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = fopen(oldvimrc, "r")) == NULL) data/vim-8.2.1913/src/dosinst.c:789: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(oldvimrc + runtimeidx, "vimrc~1"); // short version of .vimrc data/vim-8.2.1913/src/dosinst.c:790: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). if ((fd = fopen(oldvimrc, "r")) == NULL) data/vim-8.2.1913/src/dosinst.c:792:6: [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(oldvimrc + runtimeidx, ".vimrc"); data/vim-8.2.1913/src/dosinst.c:793:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(oldvimrc, "r"); data/vim-8.2.1913/src/dosinst.c:835:7: [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). fd = fopen(batpath, "w"); data/vim-8.2.1913/src/dosinst.c:1021: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(names[count], "Do not create any .bat file."); data/vim-8.2.1913/src/dosinst.c:1123:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(batpath, "C:/Windows"); data/vim-8.2.1913/src/dosinst.c:1185:10: [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). fd = fopen(fname, "w"); data/vim-8.2.1913/src/dosinst.c:1237: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 ((tfd = fopen("diff.exe", "r")) != NULL) data/vim-8.2.1913/src/dosinst.c:1359:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(vimrc + runtimeidx, "_vimrc"); data/vim-8.2.1913/src/dosinst.c:1510:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exe_cmd[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1580:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vim_exe_path[MAX_PATH]; data/vim-8.2.1913/src/dosinst.c:1581:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char display_name[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1582:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char uninstall_string[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1583:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char icon_string[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1592: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 bufg[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1788:6: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wsz[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1835:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char shell_folder_path[MAX_PATH]; data/vim-8.2.1913/src/dosinst.c:1862:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char executable_path[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1863:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char link_name[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1936: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 shell_folder_path[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:1945: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(shell_folder_path, "Vim Online.url"); data/vim-8.2.1913/src/dosinst.c:2087:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char register_command_string[BUFSIZE + 30]; data/vim-8.2.1913/src/dosinst.c:2101:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. dir_remove_last(const char *path, char to[MAX_PATH]) data/vim-8.2.1913/src/dosinst.c:2101:35: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. dir_remove_last(const char *path, char to[MAX_PATH]) data/vim-8.2.1913/src/dosinst.c:2147:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAX_PATH]; data/vim-8.2.1913/src/dosinst.c:2243:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vimdir_path[MAX_PATH]; data/vim-8.2.1913/src/dosinst.c:2244:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vimfiles_path[MAX_PATH + 9]; data/vim-8.2.1913/src/dosinst.c:2245:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_dirname[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:2305:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_dirname[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:2332: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(tmp_dirname, "\\vimfiles\\compiler"); data/vim-8.2.1913/src/dosinst.c:2705:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/dosinst.c:2763: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). i = atoi(buf); data/vim-8.2.1913/src/dosinst.h:146: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 widename[2 * BUFSIZE]; data/vim-8.2.1913/src/dosinst.h:147: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 location[2 * BUFSIZE + 2]; data/vim-8.2.1913/src/dosinst.h:151:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)name, -1, data/vim-8.2.1913/src/dosinst.h:289: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 tbuf[BUFSIZE]; data/vim-8.2.1913/src/dosinst.h:293: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(tbuf, "\\vim write test"); data/vim-8.2.1913/src/dosinst.h:294:7: [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). fd = fopen(tbuf, "w"); data/vim-8.2.1913/src/dosinst.h:334:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char batpath[BUFSIZE]; // path of batch file to create; not data/vim-8.2.1913/src/dosinst.h:361: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 *(icon_names[ICON_COUNT]) = data/vim-8.2.1913/src/dosinst.h:365: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 *(icon_link_names[ICON_COUNT]) = data/vim-8.2.1913/src/dosinst.h:379:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmd_buf[BUFSIZE * 2 + 35]; data/vim-8.2.1913/src/dosinst.h:424:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[3] = "-:"; data/vim-8.2.1913/src/dosinst.h:480: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 installdir[MAX_PATH-9]; // top of the installation dir, where the data/vim-8.2.1913/src/drawline.c:133: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((char *)extra, "%-*c ", number_width(wp), SIGN_BYTE); data/vim-8.2.1913/src/drawline.c:145: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((char *)extra, "%-*c ", number_width(wp), data/vim-8.2.1913/src/eval.c:730:15: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). retval = atol((char *)s); data/vim-8.2.1913/src/evalfunc.c:3391: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 sid_buf[25]; data/vim-8.2.1913/src/evalfunc.c:3398: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(sid_buf, "<SNR>%ld_", (long)current_sctx.sc_sid); data/vim-8.2.1913/src/evalfunc.c:4061: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((char *)buf + 1, "%ld", reglen + 1); data/vim-8.2.1913/src/evalfunc.c:5326:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int major = atoi((char *)name + 6); data/vim-8.2.1913/src/evalfunc.c:5327:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int minor = atoi((char *)name + 8); data/vim-8.2.1913/src/evalfunc.c:5334:19: [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). && has_patch(atoi((char *)name + 10)))))); data/vim-8.2.1913/src/evalfunc.c:5337:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). n = has_patch(atoi((char *)name + 5)); data/vim-8.2.1913/src/evalfunc.c:6758: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). int fd = open("/dev/urandom", O_RDONLY); data/vim-8.2.1913/src/evalfunc.c:6762:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bytes[sizeof(UINT32_T)]; data/vim-8.2.1913/src/evalvars.c:2440: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((char *)newval, " ++bin"); data/vim-8.2.1913/src/evalvars.c:2442: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((char *)newval, " ++nobin"); data/vim-8.2.1913/src/evalvars.c:2462: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((char *)newval + STRLEN(newval), " ++bad=%c", eap->bad_char); data/vim-8.2.1913/src/evalwindow.c:1013: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((char *)buf, "%dresize %d|", winnr, wp->w_height); data/vim-8.2.1913/src/evalwindow.c:1015: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((char *)buf, "vert %dresize %d|", winnr, wp->w_width); data/vim-8.2.1913/src/ex_cmdidxs.h:42:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char cmdidxs2[26][26] = data/vim-8.2.1913/src/ex_cmds.c:35:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf1[20]; data/vim-8.2.1913/src/ex_cmds.c:36:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[20]; data/vim-8.2.1913/src/ex_cmds.c:162:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). width = atoi((char *)eap->arg); data/vim-8.2.1913/src/ex_cmds.c:1702:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char numbuf[30]; data/vim-8.2.1913/src/ex_cmds.c:2639:15: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tlnum = atol((char *)command); data/vim-8.2.1913/src/ex_cmds.c:3406:16: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bigness = atol((char *)x); data/vim-8.2.1913/src/ex_docmd.c:2618: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 ex_error_buf[MSG_BUF_LEN]; data/vim-8.2.1913/src/ex_docmd.c:2872:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cmod->cmod_verbose = atoi((char *)eap->cmd); data/vim-8.2.1913/src/ex_docmd.c:6391:9: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). n = atol((char *)eap->arg); data/vim-8.2.1913/src/ex_docmd.c:7278: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((char *)IObuff, _("Window position: X %d, Y %d"), x, y); data/vim-8.2.1913/src/ex_docmd.c:8659: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((char *)strbuf, "%d", autocmd_bufnr); data/vim-8.2.1913/src/ex_docmd.c:8692: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((char *)strbuf, "%ld", SOURCING_LNUM); data/vim-8.2.1913/src/ex_docmd.c:8703: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((char *)strbuf, "%ld", data/vim-8.2.1913/src/ex_docmd.c:8714: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((char *)strbuf, "<SNR>%d_", current_sctx.sc_sid); data/vim-8.2.1913/src/fileio.c:1551:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char replstr[2]; data/vim-8.2.1913/src/fileio.c:1625:18: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). ucs2len = MultiByteToWideChar(codepage, data/vim-8.2.1913/src/fileio.c:2434: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((char *)IObuff + STRLEN(IObuff), data/vim-8.2.1913/src/fileio.c:2440: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((char *)IObuff + STRLEN(IObuff), data/vim-8.2.1913/src/fileio.c:3621:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tbuf[FGETS_SIZE]; data/vim-8.2.1913/src/fileio.c:3712: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 tempname[MAXPATHL + 1]; data/vim-8.2.1913/src/fileio.c:3723: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((char *)gettail((char_u *)tempname), "%d", n); data/vim-8.2.1913/src/fileio.c:5118: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((char *)itmp + itmplen, "v%ld", nr + off); data/vim-8.2.1913/src/fileio.c:5179:5: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy(buf4, L"VIM"); data/vim-8.2.1913/src/fileio.c:5212: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((char *)itmp, "VIM%c", extra_char); data/vim-8.2.1913/src/fold.c:3430:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). n = atoi((char *)s); data/vim-8.2.1913/src/fold.c:3455:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). n = atoi((char *)s); data/vim-8.2.1913/src/getchar.c:257: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((char *)number, "%ld", n); data/vim-8.2.1913/src/globals.h:993:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. EXTERN char mb_bytelen_tab[256]; data/vim-8.2.1913/src/globals.h:1143:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. EXTERN char msg_buf[MSG_BUF_LEN]; // small buffer for messages data/vim-8.2.1913/src/globals.h:1288:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. EXTERN char breakat_flags[256]; // which characters are in 'breakat' data/vim-8.2.1913/src/globals.h:1509:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. EXTERN char pseps[2] INIT2('\\', 0); data/vim-8.2.1913/src/globals.h:1880:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. EXTERN char windowsVersion[20] INIT(= {0}); data/vim-8.2.1913/src/gui.c:353:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[READ_BUFFER_SIZE]; data/vim-8.2.1913/src/gui.c:2294: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((char *)extra, "%*c ", number_width(curwin), ' '); data/vim-8.2.1913/src/gui_at_fs.c:103: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 SFstartDir[MAXPATHL], data/vim-8.2.1913/src/gui_at_fs.c:160: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 SFtextBuffer[MAXPATHL*sizeof(wchar_t)]; data/vim-8.2.1913/src/gui_at_fs.c:162: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 SFtextBuffer[MAXPATHL]; data/vim-8.2.1913/src/gui_at_fs.c:2095:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[2]; data/vim-8.2.1913/src/gui_athena.c:1128: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((char *)pname, "-pullright"); data/vim-8.2.1913/src/gui_athena.c:2048:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[2]; data/vim-8.2.1913/src/gui_beval.c:140:19: [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). screen_num = atoi(++p); data/vim-8.2.1913/src/gui_dwrite.cpp:760:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t familyName[100]; data/vim-8.2.1913/src/gui_dwrite.cpp:799:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; data/vim-8.2.1913/src/gui_gtk.c:281:38: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (gui_find_bitmap(dest, buf, (char *)suffixes[i]) == OK) data/vim-8.2.1913/src/gui_gtk.c:470:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[MAXPATHL]; data/vim-8.2.1913/src/gui_gtk.c:512:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[MAXPATHL]; data/vim-8.2.1913/src/gui_gtk_x11.c:2292: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(session_file + len, suffix, sizeof(suffix)); data/vim-8.2.1913/src/gui_gtk_x11.c:2298: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. const char *argv[8]; data/vim-8.2.1913/src/gui_gtk_x11.c:2452: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(new_atoms, existing_atoms, count * sizeof(Atom)); data/vim-8.2.1913/src/gui_haiku.cc:971:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)km.chars, "\033:qa\r", km.length); data/vim-8.2.1913/src/gui_haiku.cc:1252: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((char *)dest, bytes, numBytes); data/vim-8.2.1913/src/gui_haiku.cc:1388: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((char *)dest, string, len); data/vim-8.2.1913/src/gui_haiku.cc:1620:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(km.chars, chars+i, clen); data/vim-8.2.1913/src/gui_haiku.cc:2616:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[10] = {0}; data/vim-8.2.1913/src/gui_haiku.cc:2687:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10] = {0}; data/vim-8.2.1913/src/gui_haiku.cc:3843: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 font_name[buff_size] = {0}; data/vim-8.2.1913/src/gui_haiku.cc:3875: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 buff[buff_size] = {0}; data/vim-8.2.1913/src/gui_haiku.cc:4153: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[LINE_LEN]; data/vim-8.2.1913/src/gui_haiku.cc:4160:7: [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). fd = fopen((char *)fname, "rt"); data/vim-8.2.1913/src/gui_motif.c:1293:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). wid = (Dimension)atoi(++cp); data/vim-8.2.1913/src/gui_motif.c:1938:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mneString[2]; data/vim-8.2.1913/src/gui_motif.c:2014:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mneString[2]; data/vim-8.2.1913/src/gui_motif.c:2408:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[2]; data/vim-8.2.1913/src/gui_photon.c:441: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 string[6]; data/vim-8.2.1913/src/gui_photon.c:519:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[6]; data/vim-8.2.1913/src/gui_photon.c:893:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[16]; data/vim-8.2.1913/src/gui_photon.c:999:6: [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(new_titles, panel_titles, num_panels * sizeof(char **)); data/vim-8.2.1913/src/gui_w32.c:102: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). dx_geom = atoi((char *)value); data/vim-8.2.1913/src/gui_w32.c:109:19: [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). dx_renmode = atoi((char *)value); data/vim-8.2.1913/src/gui_w32.c:116:19: [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). dx_taamode = atoi((char *)value); data/vim-8.2.1913/src/gui_w32.c:3671:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szFile[BUFPATHLEN]; data/vim-8.2.1913/src/gui_w32.c:4012:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szText[80]; data/vim-8.2.1913/src/gui_w32.c:4066:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szText[80]; data/vim-8.2.1913/src/gui_w32.c:4850:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[2048]; data/vim-8.2.1913/src/gui_w32.c:4886:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[IOSIZE]; data/vim-8.2.1913/src/gui_w32.c:4935:5: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy(p + 1, L"gvimd.exe"); data/vim-8.2.1913/src/gui_w32.c:4937:5: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy(p + 1, L"gvim.exe"); data/vim-8.2.1913/src/gui_w32.c:6242:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). len = MultiByteToWideChar(enc_codepage, data/vim-8.2.1913/src/gui_w32.c:7355:10: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). nChar = MultiByteToWideChar( data/vim-8.2.1913/src/gui_x11.c:2224:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char spec[8]; // space enough to hold "#RRGGBB" data/vim-8.2.1913/src/gui_x11.c:2349:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((wchar_t *)buf)[wlen] = c; data/vim-8.2.1913/src/gui_xim.c:228:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/vim-8.2.1913/src/gui_xim.c:1373:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *p, data/vim-8.2.1913/src/gui_xim.c:1379:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[IMLEN_MAX + 7]; data/vim-8.2.1913/src/gui_xim.c:1409: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(buf, "@im="); data/vim-8.2.1913/src/gui_xmdlg.c:52: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 wild[3] = "*"; data/vim-8.2.1913/src/gui_xmdlg.c:164:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:165:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf3[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:182:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:183:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf3[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:229:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size = atoi(buf); data/vim-8.2.1913/src/gui_xmdlg.c:230: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, "%3d", size); data/vim-8.2.1913/src/gui_xmdlg.c:238:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size = atoi(buf); data/vim-8.2.1913/src/gui_xmdlg.c:242:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%3d", size); data/vim-8.2.1913/src/gui_xmdlg.c:244:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%4.1f", temp); data/vim-8.2.1913/src/gui_xmdlg.c:255:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf1[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:256:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:310:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:346:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:365:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *list[NONE][MAX_ENTRIES_IN_LIST]; data/vim-8.2.1913/src/gui_xmdlg.c:367:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:549:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char newSize[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:866:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char big_font[MAX_FONT_NAME_LEN]; data/vim-8.2.1913/src/gui_xmdlg.c:886: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[128]; data/vim-8.2.1913/src/gui_xmdlg.c:891:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size = atoi(buf); data/vim-8.2.1913/src/gui_xmdlg.c:1214: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 namebuf[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:1215: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 stylebuf[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:1216: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 sizebuf[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/gui_xmdlg.c:1217: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 encodingbuf[TEMP_BUF_SIZE]; data/vim-8.2.1913/src/hardcopy.c:315:19: [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). colorindex = atoi(color); data/vim-8.2.1913/src/hardcopy.c:386: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((char *)tbuf, "%6ld", (long)lnum); data/vim-8.2.1913/src/hardcopy.c:434: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 *(units[4]) = PRT_UNIT_NAMES; data/vim-8.2.1913/src/hardcopy.c:503: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((char *)tbuf, _("Page %d"), pagenum); data/vim-8.2.1913/src/hardcopy.c:726: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((char *)IObuff, _("Printing page %d (%d%%)"), data/vim-8.2.1913/src/hardcopy.c:737: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((char *)IObuff + STRLEN(IObuff), data/vim-8.2.1913/src/hardcopy.c:1016:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *(ps_fontname[4]); data/vim-8.2.1913/src/hardcopy.c:1396: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 prt_cmap[80]; data/vim-8.2.1913/src/hardcopy.c:1446: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((char *)prt_line_buffer, "%d ", i); data/vim-8.2.1913/src/hardcopy.c:1547: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((char *)prt_line_buffer, "%d", integer); data/vim-8.2.1913/src/hardcopy.c:1559: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((char *)prt_line_buffer, ".%0*d", prec, fraction); data/vim-8.2.1913/src/hardcopy.c:1576: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((char *)prt_line_buffer, "d\n"); data/vim-8.2.1913/src/hardcopy.c:2015: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((char *)prt_line_buffer, " %d", ints[i]); data/vim-8.2.1913/src/hardcopy.c:2066: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((char *)prt_line_buffer, "%%%%Requirements:"); data/vim-8.2.1913/src/hardcopy.c:2083: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((char *)prt_line_buffer, "%d", num_copies); data/vim-8.2.1913/src/hardcopy.c:2511:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. paper_name = (char *)printer_opts[OPT_PRINT_PAPER].string; data/vim-8.2.1913/src/hardcopy.c:2563:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fontsize = atoi((char *)p + 2); data/vim-8.2.1913/src/hardcopy.c:2727:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/vim-8.2.1913/src/hardcopy.c:3401: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((char *)ch_buff, "%03o", (unsigned int)ch); data/vim-8.2.1913/src/help.c:855:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. fd = mch_fopen((char *)fnames[fi], "r"); data/vim-8.2.1913/src/help.c:1027:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. fd = mch_fopen((char *)files[fi], "r"); data/vim-8.2.1913/src/highlight.c:496: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 *(color_names[28]) = { data/vim-8.2.1913/src/highlight.c:1131: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). color = atoi((char *)arg); data/vim-8.2.1913/src/highlight.c:2614: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((char *)buf, "%d", iarg - 1); data/vim-8.2.1913/src/highlight.c:2736: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((char *)buf, "#%02x%02x%02x", data/vim-8.2.1913/src/highlight.c:2761: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((char *)name, "%d", n); data/vim-8.2.1913/src/highlight.c:3533: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((char *)userhl, "User%d", i + 1); data/vim-8.2.1913/src/if_cscope.c:129:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char connection[5]; data/vim-8.2.1913/src/if_cscope.c:694: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). nlines = atoi(stok); data/vim-8.2.1913/src/if_cscope.c:921:12: [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. (void)strcat(cmd, " -P"); data/vim-8.2.1913/src/if_cscope.c:1536: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). i = atoi(stok); data/vim-8.2.1913/src/if_cscope.c:1819:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(context, "<<global>>"); data/vim-8.2.1913/src/if_cscope.c:2326:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[20]; // for sprintf " (#%d)" data/vim-8.2.1913/src/if_cscope.c:2363:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, " (#%d)", i); data/vim-8.2.1913/src/if_ole.cpp:524:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char module[MAX_PATH]; data/vim-8.2.1913/src/if_ole.cpp:532:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char clsid[GUID_STRING_SIZE]; data/vim-8.2.1913/src/if_ole.cpp:536:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char libid[GUID_STRING_SIZE]; data/vim-8.2.1913/src/if_ole.cpp:540:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char Key[MAX_CLSID_LEN]; data/vim-8.2.1913/src/if_ole.cpp:541:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(Key, "CLSID\\"); data/vim-8.2.1913/src/if_ole.cpp:560:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t w_module[MAX_PATH]; data/vim-8.2.1913/src/if_ole.cpp:561:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, module, -1, w_module, MAX_PATH); data/vim-8.2.1913/src/if_ole.cpp:608:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char clsid[GUID_STRING_SIZE]; data/vim-8.2.1913/src/if_ole.cpp:612:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char Key[MAX_CLSID_LEN]; data/vim-8.2.1913/src/if_ole.cpp:613:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(Key, "CLSID\\"); data/vim-8.2.1913/src/if_ole.cpp:657:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/vim-8.2.1913/src/if_ole.cpp:679:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/vim-8.2.1913/src/if_py_both.h:728:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ptrBuf[sizeof(void *) * 2 + 3]; data/vim-8.2.1913/src/if_py_both.h:743: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(ptrBuf, "%p", data/vim-8.2.1913/src/if_py_both.h:759: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[NUMBUFLEN]; data/vim-8.2.1913/src/if_py_both.h:762: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(buf, "%ld", (long)our_tv->vval.v_number); data/vim-8.2.1913/src/if_py_both.h:768: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[NUMBUFLEN]; data/vim-8.2.1913/src/if_py_both.h:770: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(buf, "%f", our_tv->vval.v_float); data/vim-8.2.1913/src/if_py_both.h:5729: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(code, code_hdr, code_hdr_len); data/vim-8.2.1913/src/if_py_both.h:6115:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hexBuf[sizeof(void *) * 2 + 3]; data/vim-8.2.1913/src/if_py_both.h:6117: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(hexBuf, "%p", (void *)obj); data/vim-8.2.1913/src/if_python.c:1115: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[BUFFER_SIZE]; data/vim-8.2.1913/src/if_python.c:1130:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buffer, "execfile('"); data/vim-8.2.1913/src/if_python.c:1424: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 *(argv[2]) = {"/must>not&exist/foo", NULL}; data/vim-8.2.1913/src/if_python3.c:1145: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[BUFFER_SIZE]; data/vim-8.2.1913/src/if_python3.c:1166:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buffer, "exec(compile(open('"); data/vim-8.2.1913/src/if_python3.c:1183:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(p,"','rb').read(),'"); data/vim-8.2.1913/src/if_python3.c:1188:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(p,"','exec'))"); data/vim-8.2.1913/src/if_python3.c:1692:12: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static wchar_t *(argv[2]) = {L"/must>not&exist/foo", NULL}; data/vim-8.2.1913/src/if_ruby.c:1021:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZ]; data/vim-8.2.1913/src/if_ruby.c:1292:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[4]; data/vim-8.2.1913/src/if_ruby.c:1296: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(buf, "%02X", (unsigned char)(RSTRING_PTR(str)[i])); data/vim-8.2.1913/src/if_tcl.c:824:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rbuf[64]; data/vim-8.2.1913/src/if_tcl.c:826: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(rbuf, _("row %d column %d"), data/vim-8.2.1913/src/if_tcl.c:1043:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/vim-8.2.1913/src/if_tcl.c:1045:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, _("row %d column %d"), (int)row2tcl(win->w_cursor.lnum), (int)col2tcl(win->w_cursor.col)); data/vim-8.2.1913/src/if_tcl.c:1250: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(&saveinfo, &tclinfo, sizeof(tcl_info)); data/vim-8.2.1913/src/if_tcl.c:1266: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(&tclinfo, &saveinfo, sizeof(tcl_info)); data/vim-8.2.1913/src/if_tcl.c:1443: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 name[VARNAME_SIZE]; data/vim-8.2.1913/src/if_tcl.c:1666:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char varname[VARNAME_SIZE]; // must be writeable data/vim-8.2.1913/src/if_tcl.c:1694:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char varname[VARNAME_SIZE]; // Tcl_LinkVar requires writeable varname data/vim-8.2.1913/src/if_tcl.c:1862: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[50]; data/vim-8.2.1913/src/if_tcl.c:1864: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(buf, _("E572: exit code %d"), tclinfo.exitvalue); data/vim-8.2.1913/src/if_tcl.c:1948:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char var_lnum[VARNAME_SIZE]; // must be writeable memory data/vim-8.2.1913/src/if_tcl.c:1949:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char var_line[VARNAME_SIZE]; data/vim-8.2.1913/src/if_xcmdsrv.c:301: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((char *)propInfo, "%x %.*s", (int_u)commWindow, data/vim-8.2.1913/src/if_xcmdsrv.c:352: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((char *)propInfo, "%x %.*s", data/vim-8.2.1913/src/if_xcmdsrv.c:452: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((char *)property + length, "%c-r %x %d", data/vim-8.2.1913/src/if_xcmdsrv.c:1458: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((char *)winstr, "0x%x", (unsigned int)win); data/vim-8.2.1913/src/iid_ole.c:35: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 c[8]; data/vim-8.2.1913/src/indent.c:70:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). (*array)[t++] = atoi((char *)cp); data/vim-8.2.1913/src/insexpand.c:1298:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. fp = mch_fopen((char *)files[i], "r"); // open dictionary file data/vim-8.2.1913/src/insexpand.c:1302:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _("Scanning dictionary: %s"), (char *)files[i]); data/vim-8.2.1913/src/job.c:576: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(opt->jo_ansi_colors, rgb, sizeof(rgb)); data/vim-8.2.1913/src/job.c:1340: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((char *)numbuf, "%d", opt.jo_io_buf[PART_IN]); data/vim-8.2.1913/src/job.c:1363:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. argv[i] = (char *)vim_strsave((char_u *)argv_arg[i]); data/vim-8.2.1913/src/libvterm/src/keyboard.c:30:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[6]; data/vim-8.2.1913/src/libvterm/src/mouse.c:25:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char utf8[18]; size_t len = 0; data/vim-8.2.1913/src/libvterm/src/parser.c:50:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char seq[INTERMED_MAX+1]; data/vim-8.2.1913/src/libvterm/src/state.c:183: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(new_chars, state->combine_chars, state->combine_chars_size * sizeof(new_chars[0])); data/vim-8.2.1913/src/libvterm/src/vterm.c:154: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(vt->outbuffer + vt->outbuffer_cur, bytes, len); data/vim-8.2.1913/src/libvterm/src/vterm.c:163:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; // 1Kbyte is enough for everybody, right? data/vim-8.2.1913/src/libvterm/src/vterm.c:246: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(buffer, vt->outbuffer, len); data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:44:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[4*sizeof(uint32_t)]; data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:156:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char decrqss[4]; data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:189:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char intermed[INTERMED_MAX]; data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:194:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char leader[CSI_LEADER_MAX]; data/vim-8.2.1913/src/libvterm/src/vterm_internal.h:204:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char command[CSI_LEADER_MAX]; data/vim-8.2.1913/src/libvterm/t/harness.c:525:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024] = {0}; data/vim-8.2.1913/src/libvterm/t/harness.c:1028:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outbuff[1024]; data/vim-8.2.1913/src/macros.h:160:26: [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). # define mch_fopen(n, p) fopen(vms_fixfilename(n), (p)) data/vim-8.2.1913/src/macros.h:201:28: [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). # define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p)) data/vim-8.2.1913/src/main.c:1795:8: [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). def = atoi((char *)&(p[*idx])); data/vim-8.2.1913/src/main.c:2551:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char posix_path[MAXPATHL]; data/vim-8.2.1913/src/main.c:2912:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/vim-8.2.1913/src/main.c:3609:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linkbuf[MAXPATHL + 1]; data/vim-8.2.1913/src/mark.c:794: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((char *)IObuff, " %c %6ld %4d ", c, p->lnum, p->col); data/vim-8.2.1913/src/mark.c:926: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((char *)IObuff, "%c %2d %5ld %4d ", data/vim-8.2.1913/src/mark.c:972: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((char *)IObuff, "%c %3d %5ld %4d ", data/vim-8.2.1913/src/match.c:975:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[30]; // use 30 to avoid compiler warning data/vim-8.2.1913/src/match.c:990:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "pos%d", i + 1); data/vim-8.2.1913/src/match.c:1068: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 buf[30]; // use 30 to avoid compiler warning data/vim-8.2.1913/src/mbyte.c:145: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 utf8len_tab[256] = data/vim-8.2.1913/src/mbyte.c:160: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 utf8len_tab_zero[256] = data/vim-8.2.1913/src/mbyte.c:434:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (GetCPInfo(atoi((char *)name + 2), &cpinfo) != 0) data/vim-8.2.1913/src/mbyte.c:496:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (GetCPInfo(atoi((char *)p_enc + 2), &cpinfo) != 0) data/vim-8.2.1913/src/mbyte.c:508:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). enc_dbcs_new = atoi((char *)p_enc + 2); data/vim-8.2.1913/src/mbyte.c:532:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). || (enc_dbcs_new = atoi((char *)p_enc + 8)) == 0) data/vim-8.2.1913/src/mbyte.c:677: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 buf[MB_MAXBYTES + 1]; data/vim-8.2.1913/src/mbyte.c:3742: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((char *)IObuff + rlen, "%02x ", data/vim-8.2.1913/src/mbyte.c:4542:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[50]; data/vim-8.2.1913/src/mbyte.c:4597:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[50]; data/vim-8.2.1913/src/mbyte.c:4607: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(buf, "cp%ld", acp); data/vim-8.2.1913/src/mbyte.c:4643:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cp = atoi((char *)p + 2); data/vim-8.2.1913/src/mbyte.c:5321:13: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). tmp_len = MultiByteToWideChar(vcp->vc_cpfrom, data/vim-8.2.1913/src/mbyte.c:5343:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(vcp->vc_cpfrom, 0, data/vim-8.2.1913/src/memline.c:1982:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. msg_puts((char *)gettail(files[i])); data/vim-8.2.1913/src/menu.c:252:25: [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). menuarg.iconidx = atoi((char *)menu_path + 7); data/vim-8.2.1913/src/message.c:1472:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[20]; data/vim-8.2.1913/src/message.c:1474: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, "%ld", n); data/vim-8.2.1913/src/message.c:2676: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(buf, p, n); data/vim-8.2.1913/src/message.c:4293: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 tmp[TMP_LEN]; data/vim-8.2.1913/src/message.c:4710: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 f[6]; data/vim-8.2.1913/src/message.c:4737: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 b[8 * sizeof(uvarnumber_T)]; data/vim-8.2.1913/src/message.c:4748:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp + str_arg_l, b + sizeof(b) - b_l, b_l); data/vim-8.2.1913/src/message.c:4855:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char format[40]; data/vim-8.2.1913/src/message.c:4927:10: [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. l += sprintf(format + l, ".%d", (int)precision); data/vim-8.2.1913/src/misc1.c:1674: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 userSettingsPath[MAXPATHL]; data/vim-8.2.1913/src/misc2.c:4424:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (*argv)[i] = (char *)vim_strsave((char_u *)(*argv)[i]); data/vim-8.2.1913/src/nbdebug.c:63:9: [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). sleep(atoi(getenv(wait_var))); data/vim-8.2.1913/src/nbdebug.c:86:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). nb_debug = fopen(file, "a"); data/vim-8.2.1913/src/nbdebug.c:118: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[BUFSIZ]; data/vim-8.2.1913/src/nbdebug.c:136: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 msg[256]; data/vim-8.2.1913/src/nbdebug.c:137: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[256]; data/vim-8.2.1913/src/nbdebug.c:142: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(buf, "%d", err->request_code); data/vim-8.2.1913/src/netbeans.c:133:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/vim-8.2.1913/src/netbeans.c:209:9: [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). port = atoi(address); data/vim-8.2.1913/src/netbeans.c:734: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 buf[128]; data/vim-8.2.1913/src/netbeans.c:746: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, "%d:unmodified=%d\n", i, r_cmdno); data/vim-8.2.1913/src/netbeans.c:750: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(buf, "%d:killed=%d\n", i, r_cmdno); data/vim-8.2.1913/src/netbeans.c:777:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reply[32]; data/vim-8.2.1913/src/netbeans.c:785: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(reply, "%d\n", cmdno); data/vim-8.2.1913/src/netbeans.c:815:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reply[32]; data/vim-8.2.1913/src/netbeans.c:819: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(reply, "%d %ld\n", cmdno, result); data/vim-8.2.1913/src/netbeans.c:1028: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((char *)text, "%d %ld %d %ld", data/vim-8.2.1913/src/netbeans.c:1516:24: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). long savedChars = atol((char *)args); data/vim-8.2.1913/src/netbeans.c:1763:24: [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). buf->bufp->b_mtime = atoi((char *)args); data/vim-8.2.1913/src/netbeans.c:2270:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[1024]; data/vim-8.2.1913/src/netbeans.c:2296:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keybuf[KEYBUFLEN]; data/vim-8.2.1913/src/netbeans.c:2297:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/vim-8.2.1913/src/netbeans.c:2389:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[2]; data/vim-8.2.1913/src/netbeans.c:2546:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/vim-8.2.1913/src/netbeans.c:2550: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(buf, "0:disconnect=%d\n", r_cmdno); data/vim-8.2.1913/src/netbeans.c:2580:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/vim-8.2.1913/src/netbeans.c:2585: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, "0:geometry=%d %d %d %d %d\n", data/vim-8.2.1913/src/netbeans.c:2600:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2*MAXPATHL]; data/vim-8.2.1913/src/netbeans.c:2630:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2*MAXPATHL]; data/vim-8.2.1913/src/netbeans.c:2669:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2*MAXPATHL]; data/vim-8.2.1913/src/netbeans.c:2677: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(buffer, "%d:killed=%d\n", bufno, r_cmdno); data/vim-8.2.1913/src/netbeans.c:2800: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((char *)buf, "%d:remove=%d %ld %ld\n", bufno, r_cmdno, off, len); data/vim-8.2.1913/src/netbeans.c:2822:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/vim-8.2.1913/src/netbeans.c:2837: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(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off); data/vim-8.2.1913/src/netbeans.c:2841: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(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, r_cmdno, data/vim-8.2.1913/src/netbeans.c:2858:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keyName[60]; data/vim-8.2.1913/src/netbeans.c:2874:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[2*MAXPATHL]; data/vim-8.2.1913/src/netbeans.c:2904: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, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off); data/vim-8.2.1913/src/netbeans.c:2947: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((char *)buf, "%d:save=%d\n", bufno, r_cmdno); data/vim-8.2.1913/src/netbeans.c:2974: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((char *)buf, "%d:remove=%d 0 -1\n", bufno, r_cmdno); data/vim-8.2.1913/src/netbeans.c:3177: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 fgbuf[2 * (8 + MAX_COLOR_LENGTH) + 1]; data/vim-8.2.1913/src/netbeans.c:3178: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 bgbuf[2 * (8 + MAX_COLOR_LENGTH) + 1]; data/vim-8.2.1913/src/netbeans.c:3184: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(fgbuf, "guifg=#%06x", value & 0xFFFFFF); data/vim-8.2.1913/src/netbeans.c:3190: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(bgbuf, "guibg=#%06x", value & 0xFFFFFF); data/vim-8.2.1913/src/netbeans.c:3481: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 msgbuf[IOSIZE]; data/vim-8.2.1913/src/normal.c:1810: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((char *)showcmd_buf, "%ldx%ld", lines, data/vim-8.2.1913/src/normal.c:1814: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((char *)showcmd_buf, "%ld", lines); data/vim-8.2.1913/src/normal.c:1846: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((char *)showcmd_buf, "%d", chars); data/vim-8.2.1913/src/normal.c:1848: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((char *)showcmd_buf, "%d-%d", chars, bytes); data/vim-8.2.1913/src/normal.c:3633: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((char *)buf, ".,.+%ld", cap->count0 - 1); data/vim-8.2.1913/src/normal.c:3643: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((char *)buf + STRLEN(buf), "%ld", cap->count0); data/vim-8.2.1913/src/normal.c:3670: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((char *)buf, ":%ldta ", cap->count0); data/vim-8.2.1913/src/option.c:136: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 *(names[4]) = {"", "TMPDIR", "TEMP", "TMP"}; data/vim-8.2.1913/src/option.c:138: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 *(names[3]) = {"TMPDIR", "TEMP", "TMP"}; data/vim-8.2.1913/src/option.c:366:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. p = (char_u *)_(*(char **)options[opt_idx].var); data/vim-8.2.1913/src/option.c:404: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[20]; data/vim-8.2.1913/src/option.c:489:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/vim-8.2.1913/src/option.c:494: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(buf, "cp%ld", (long)GetACP()); data/vim-8.2.1913/src/option.c:496: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(buf, "cp%ld", (long)GetConsoleCP()); data/vim-8.2.1913/src/option.c:1161:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[80]; data/vim-8.2.1913/src/option.c:6491: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((char *)NameBuff, "%ld", *(long *)varp); data/vim-8.2.1913/src/optionstr.c:575: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 errbuf[80]; data/vim-8.2.1913/src/optionstr.c:1390:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int colors = atoi((char *)T_CCO); data/vim-8.2.1913/src/optionstr.c:1820: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((char *)errbuf, data/vim-8.2.1913/src/os_amiga.c:447: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((char *)buf1, "t:nc%p", FindTask(0)); data/vim-8.2.1913/src/os_amiga.c:449: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((char *)buf1, "t:nc%ld", (long)buf1); data/vim-8.2.1913/src/os_amiga.c:1016:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id_a[sizeof(struct InfoData) + 3]; data/vim-8.2.1913/src/os_mac_conv.c:573: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[50]; data/vim-8.2.1913/src/os_mac_conv.c:583: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(buf, ".UTF-8"); data/vim-8.2.1913/src/os_mswin.c:153:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char a_buff[512], b_buff[512]; // file names, so this is enough on Win32 data/vim-8.2.1913/src/os_mswin.c:170:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp [3] = "-:"; data/vim-8.2.1913/src/os_mswin.c:393:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szName[_MAX_PATH * 3 + 1]; data/vim-8.2.1913/src/os_mswin.c:1088:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[MAX_PATH]; data/vim-8.2.1913/src/os_mswin.c:1551:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szBuffer[300]; data/vim-8.2.1913/src/os_mswin.c:2169:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[VIM_CLASSNAME_LEN + 1]; data/vim-8.2.1913/src/os_mswin.c:2184:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char server[MAX_PATH]; data/vim-8.2.1913/src/os_mswin.c:2214:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char server[MAX_PATH]; data/vim-8.2.1913/src/os_mswin.c:2303: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((char *)p, "%d", i); data/vim-8.2.1913/src/os_unix.c:1054: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). FILE *fp = fopen(VI_GDB_FILE, "w"); data/vim-8.2.1913/src/os_unix.c:1110: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((char *)IObuff, "Vim: Caught deadly signal\r\n"); data/vim-8.2.1913/src/os_unix.c:1829:23: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). x11_window = (Window)atol(winid); data/vim-8.2.1913/src/os_unix.c:2429: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((char *)s, "%d", (int)uid); // assumes s is long enough data/vim-8.2.1913/src/os_unix.c:2491: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 er[20]; data/vim-8.2.1913/src/os_unix.c:2495: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(er, "Error %d", err); data/vim-8.2.1913/src/os_unix.c:2584:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(".", O_RDONLY | O_EXTRA, 0); data/vim-8.2.1913/src/os_unix.c:2890:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[SMACK_LABEL_LEN]; data/vim-8.2.1913/src/os_unix.c:3457:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). tty_fd = open(name, O_RDONLY | O_NOCTTY | O_EXTRA, 0); data/vim-8.2.1913/src/os_unix.c:4064:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rows = atoi((char *)p); data/vim-8.2.1913/src/os_unix.c:4066: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). columns = atoi((char *)p); data/vim-8.2.1913/src/os_unix.c:4209:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char envbuf[50]; data/vim-8.2.1913/src/os_unix.c:4211: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 envbuf_Term[30]; data/vim-8.2.1913/src/os_unix.c:4212: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 envbuf_Rows[20]; data/vim-8.2.1913/src/os_unix.c:4213: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 envbuf_Lines[20]; data/vim-8.2.1913/src/os_unix.c:4214: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 envbuf_Columns[20]; data/vim-8.2.1913/src/os_unix.c:4215: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 envbuf_Colors[20]; data/vim-8.2.1913/src/os_unix.c:4217: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 envbuf_Version[20]; data/vim-8.2.1913/src/os_unix.c:4220: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 envbuf_Servername[60]; data/vim-8.2.1913/src/os_unix.c:4226: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((char *)envbuf, "%ld", rows); data/vim-8.2.1913/src/os_unix.c:4228: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((char *)envbuf, "%ld", rows); data/vim-8.2.1913/src/os_unix.c:4230: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((char *)envbuf, "%ld", columns); data/vim-8.2.1913/src/os_unix.c:4232: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((char *)envbuf, "%d", t_colors); data/vim-8.2.1913/src/os_unix.c:4237: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((char *)envbuf, "%ld", (long)get_vim_var_nr(VV_VERSION)); data/vim-8.2.1913/src/os_unix.c:4308:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). *pty_slave_fd = open(tty_name, O_RDWR | O_NOCTTY | O_EXTRA, 0); data/vim-8.2.1913/src/os_unix.c:4310:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). *pty_slave_fd = open(tty_name, O_RDWR | O_EXTRA, 0); data/vim-8.2.1913/src/os_unix.c:4710:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_RDWR | O_EXTRA, 0); data/vim-8.2.1913/src/os_unix.c:5598: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). null_fd = open("/dev/null", O_RDWR | O_EXTRA, 0); data/vim-8.2.1913/src/os_unix.c:5902:8: [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). sig = atoi((char *)how); data/vim-8.2.1913/src/os_unix.c:6770:10: [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). fd = fopen((char *)tempname, READBIN); data/vim-8.2.1913/src/os_unix.c:7628:27: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). x11_window = (Window)atol(strp); data/vim-8.2.1913/src/os_unix.c:8024:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errorstring[80]; data/vim-8.2.1913/src/os_unix.c:8073: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 errorreport[132]; data/vim-8.2.1913/src/os_unix.h:448:38: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len) data/vim-8.2.1913/src/os_unix.h:451:39: [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 mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len) data/vim-8.2.1913/src/os_vms.c:40: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 _basic[3]; data/vim-8.2.1913/src/os_vms.c:225: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[LNM$C_NAMLENGTH+1]; data/vim-8.2.1913/src/os_vms_mms.c:9:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmd[132], buf[BUFSIZ], *argp, *error_file, target[132], *mms; data/vim-8.2.1913/src/os_vms_mms.c:46:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpi = fopen("tmp:errors.vim_tmp", "r"); data/vim-8.2.1913/src/os_vms_mms.c:47:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpo = fopen(error_file, "w"); data/vim-8.2.1913/src/os_win32.c:467:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAX_ENV_PATH_LEN]; data/vim-8.2.1913/src/os_win32.c:2671: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 g_szOrigTitle[256] = { 0 }; data/vim-8.2.1913/src/os_win32.c:2853:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fdDump = fopen("dump", "wt"); data/vim-8.2.1913/src/os_win32.c:4744:6: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(szShellTitle, L" :sh"); data/vim-8.2.1913/src/os_win32.c:4751:3: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(szShellTitle, L" - !"); data/vim-8.2.1913/src/os_win32.c:5207:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[64]; data/vim-8.2.1913/src/os_win32.c:5210: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(name, "\\\\?\\pipe\\vim-%08lx-%08lx", data/vim-8.2.1913/src/os_win32.c:6210:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). length = MultiByteToWideChar(cp, 0, (LPCSTR)pchBuf, cbToWrite, data/vim-8.2.1913/src/os_win32.c:6227:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). length = MultiByteToWideChar(CP_UTF8, 0, " ", 1, NULL, 0); data/vim-8.2.1913/src/os_win32.c:6231:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, " ", 1, utf8spbuf, length); data/vim-8.2.1913/src/os_win32.c:7152: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[4096]; data/vim-8.2.1913/src/po/sjiscorr.c:12:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ]; data/vim-8.2.1913/src/popupwin.c:608: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 buf[30]; data/vim-8.2.1913/src/profiler.c:80: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 buf[50]; data/vim-8.2.1913/src/profiler.c:86: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, "%10.6lf", (double)tm->QuadPart / (double)fr.QuadPart); data/vim-8.2.1913/src/profiler.c:88: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, "%3ld.%06ld", (long)tm->tv_sec, (long)tm->tv_usec); data/vim-8.2.1913/src/pty.c:196: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 TtyName[32]; // used for opening a new pty-pair data/vim-8.2.1913/src/pty.c:224: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 TtyName[32]; data/vim-8.2.1913/src/pty.c:243: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 PtyName[32]; data/vim-8.2.1913/src/pty.c:244: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 TtyName[32]; data/vim-8.2.1913/src/pty.c:292: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 TtyName[32]; data/vim-8.2.1913/src/pty.c:294: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 ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_NONBLOCK | O_EXTRA, 0)) < 0) data/vim-8.2.1913/src/pty.c:301: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(TtyName, "/dev/ttyq%d", minor(buf.st_rdev)); data/vim-8.2.1913/src/pty.c:321: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 TtyName[32]; data/vim-8.2.1913/src/pty.c:323: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 ((f = open("/dev/ptmx", O_RDWR | O_NOCTTY | O_EXTRA, 0)) == -1) data/vim-8.2.1913/src/pty.c:357: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 TtyName[32]; data/vim-8.2.1913/src/pty.c:360: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 ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) data/vim-8.2.1913/src/pty.c:372:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((aixhack = open(TtyName, O_RDWR | O_NOCTTY | O_EXTRA, 0)) < 0) data/vim-8.2.1913/src/pty.c:404: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 PtyName[32]; data/vim-8.2.1913/src/pty.c:405: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 TtyName[32]; data/vim-8.2.1913/src/pty.c:417:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_EXTRA, 0)) == -1) data/vim-8.2.1913/src/quickfix.c:781: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(state->growbuf, IObuff, IOSIZE - 1); data/vim-8.2.1913/src/quickfix.c:946:24: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fields->enr = (int)atol((char *)rmp->startp[midx]); data/vim-8.2.1913/src/quickfix.c:959:20: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fields->lnum = atol((char *)rmp->startp[midx]); data/vim-8.2.1913/src/quickfix.c:972:24: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fields->col = (int)atol((char *)rmp->startp[midx]); data/vim-8.2.1913/src/quickfix.c:1086:24: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fields->col = (int)atol((char *)rmp->startp[midx]); data/vim-8.2.1913/src/quickfix.c:3528: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((char *)IObuff, "%2d", qf_idx); data/vim-8.2.1913/src/quickfix.c:3557: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((char *)IObuff, "%ld", qfp->qf_lnum); data/vim-8.2.1913/src/quickfix.c:3559: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((char *)IObuff, "%ld col %d", data/vim-8.2.1913/src/quickfix.c:4890: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((char *)name + (p - p_mef), "%d%d", start, off); data/vim-8.2.1913/src/quickfix.c:7680:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). buf = buflist_findnr(atoi((char *)eap->arg)); data/vim-8.2.1913/src/regexp.c:430: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 *EQUIVAL_CLASS_C[16] = { data/vim-8.2.1913/src/regexp.c:2668:10: [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). f = fopen(BT_REGEXP_DEBUG_LOG_NAME, "a"); data/vim-8.2.1913/src/regexp_bt.c:4891:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("bt_regexp_log.log", "a"); data/vim-8.2.1913/src/regexp_bt.c:4971: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 buf[50]; data/vim-8.2.1913/src/regexp_bt.c:5214: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(buf + STRLEN(buf), "MOPEN%d", OP(op) - MOPEN); data/vim-8.2.1913/src/regexp_bt.c:5229: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(buf + STRLEN(buf), "MCLOSE%d", OP(op) - MCLOSE); data/vim-8.2.1913/src/regexp_bt.c:5241: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(buf + STRLEN(buf), "BACKREF%d", OP(op) - BACKREF); data/vim-8.2.1913/src/regexp_bt.c:5260: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(buf + STRLEN(buf), "ZOPEN%d", OP(op) - ZOPEN); data/vim-8.2.1913/src/regexp_bt.c:5272: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(buf + STRLEN(buf), "ZCLOSE%d", OP(op) - ZCLOSE); data/vim-8.2.1913/src/regexp_bt.c:5284: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(buf + STRLEN(buf), "ZREF%d", OP(op) - ZREF); data/vim-8.2.1913/src/regexp_bt.c:5325: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(buf + STRLEN(buf), "BRACE_COMPLEX%d", OP(op) - BRACE_COMPLEX); data/vim-8.2.1913/src/regexp_bt.c:5335: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(buf + STRLEN(buf), "corrupt %d", OP(op)); data/vim-8.2.1913/src/regexp_nfa.c:2642:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(NFA_REGEXP_DUMP_LOG, "a"); data/vim-8.2.1913/src/regexp_nfa.c:2742:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *debugf = fopen(NFA_REGEXP_DUMP_LOG, "a"); data/vim-8.2.1913/src/regexp_nfa.c:2905:10: [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). df = fopen(NFA_REGEXP_ERROR_LOG, "a"); data/vim-8.2.1913/src/regexp_nfa.c:3896: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 buf[30]; data/vim-8.2.1913/src/regexp_nfa.c:3902: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(buf, " PIM col %d", REG_MULTI ? (int)pim->end.pos.col data/vim-8.2.1913/src/regexp_nfa.c:5241:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). log_fd = fopen(NFA_REGEXP_RUN_LOG, "a"); data/vim-8.2.1913/src/regexp_nfa.c:5564: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). debug = fopen(NFA_REGEXP_DEBUG_LOG, "a"); data/vim-8.2.1913/src/regexp_nfa.c:5584:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). log_fd = fopen(NFA_REGEXP_RUN_LOG, "a"); data/vim-8.2.1913/src/regexp_nfa.c:7002:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(NFA_REGEXP_RUN_LOG, "a"); data/vim-8.2.1913/src/regexp_nfa.c:7268: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). FILE *f = fopen(NFA_REGEXP_RUN_LOG, "a"); data/vim-8.2.1913/src/register.c:1336: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 namebuf[100]; data/vim-8.2.1913/src/register.c:2749: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). int num = atoi((char *)str); data/vim-8.2.1913/src/screen.c:1239:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi((char *)stl)) data/vim-8.2.1913/src/screen.c:1762: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 buf[20]; data/vim-8.2.1913/src/screen.c:1912: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 buf[20]; data/vim-8.2.1913/src/screen.c:4335: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 s[4]; data/vim-8.2.1913/src/screen.c:4337: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(s, " @%c", reg_recording); data/vim-8.2.1913/src/search.c:488: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(lastc_bytes, s, len); data/vim-8.2.1913/src/search.c:1379:26: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). spats[0].off.off = atol((char *)p); data/vim-8.2.1913/src/search.c:1420: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((char *)p, "%ld", spats[0].off.off); data/vim-8.2.1913/src/search.c:3136: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 t[SEARCH_STAT_BUF_LEN]; data/vim-8.2.1913/src/search.c:4035: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((char *)IObuff, "%3ld: ", count); // show match nr data/vim-8.2.1913/src/search.c:4037: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((char *)IObuff, "%4ld", *lnum); // show line nr data/vim-8.2.1913/src/search.c:4430: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(matches, srcMatches, nextMatch * sizeof(srcMatches[0])); data/vim-8.2.1913/src/search.c:4448: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(bestRecursiveMatches, recursiveMatches, data/vim-8.2.1913/src/search.c:4481: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(matches, bestRecursiveMatches, maxMatches * sizeof(matches[0])); data/vim-8.2.1913/src/session.c:1033:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(mksession_cmdline, "mksession "); data/vim-8.2.1913/src/sha256.c:210: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((void *)(ctx->buffer + left), (void *)input, fill); data/vim-8.2.1913/src/sha256.c:225: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((void *)(ctx->buffer + left), (void *)input, length); data/vim-8.2.1913/src/sha256.c:290: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((char *)hexit + j * 2, "%02x", sha256sum[j]); data/vim-8.2.1913/src/sha256.c:338:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char output[65]; data/vim-8.2.1913/src/sha256.c:367: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(output + j * 2, "%02x", sha256sum[j]); data/vim-8.2.1913/src/sign.c:780:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lbuf[MSG_BUF_LEN]; data/vim-8.2.1913/src/sign.c:781:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char group[MSG_BUF_LEN]; data/vim-8.2.1913/src/sign.c:1529:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *lnum = atoi((char *)arg); data/vim-8.2.1913/src/sign.c:1565:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *prio = atoi((char *)arg); data/vim-8.2.1913/src/sound.c:306:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/vim-8.2.1913/src/sound.c:372:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/vim-8.2.1913/src/sound.c:423:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/vim-8.2.1913/src/spell.c:4094: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((char *)badword + STRLEN(badword), "%d", i + 1); data/vim-8.2.1913/src/spellfile.c:2091: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 line1[PRINTLINESIZE]; data/vim-8.2.1913/src/spellfile.c:2092: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 line2[PRINTLINESIZE]; data/vim-8.2.1913/src/spellfile.c:2093: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 line3[PRINTLINESIZE]; data/vim-8.2.1913/src/spellfile.c:2471:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi((char *)items[1]) == 0) data/vim-8.2.1913/src/spellfile.c:2471:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (atoi((char *)items[1]) == 0) data/vim-8.2.1913/src/spellfile.c:2501:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). compmax = atoi((char *)items[1]); data/vim-8.2.1913/src/spellfile.c:2501:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. compmax = atoi((char *)items[1]); data/vim-8.2.1913/src/spellfile.c:2509: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). compminlen = atoi((char *)items[1]); data/vim-8.2.1913/src/spellfile.c:2509:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. compminlen = atoi((char *)items[1]); data/vim-8.2.1913/src/spellfile.c:2517: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). compsylmax = atoi((char *)items[1]); data/vim-8.2.1913/src/spellfile.c:2517:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. compsylmax = atoi((char *)items[1]); data/vim-8.2.1913/src/spellfile.c:2540:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi((char *)items[1]) == 0) data/vim-8.2.1913/src/spellfile.c:2540:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (atoi((char *)items[1]) == 0) data/vim-8.2.1913/src/spellfile.c:2686:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). aff_todo = atoi((char *)items[3]); data/vim-8.2.1913/src/spellfile.c:2686:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. aff_todo = atoi((char *)items[3]); data/vim-8.2.1913/src/spellfile.c:5941:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, data/vim-8.2.1913/src/spellfile.c:5951:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, data/vim-8.2.1913/src/spellsuggest.c:1146:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fd = fopen("suggestprof", "a"); data/vim-8.2.1913/src/spellsuggest.c:1363: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(changename[depth], "prefix"); data/vim-8.2.1913/src/structs.h:901:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cs_pending[CSTACK_LEN]; // CSTP_: what's pending in ":finally" data/vim-8.2.1913/src/structs.h:3835:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char silent[MENU_MODES]; // A silent flag for each mode data/vim-8.2.1913/src/syntax.c:30:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *(spo_name_tab[SPO_COUNT]) = data/vim-8.2.1913/src/tag.c:57:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *mt_names[MT_COUNT/2] = data/vim-8.2.1913/src/tag.c:1062:13: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). lnum = atol((char *)tagp.command); data/vim-8.2.1913/src/tag.c:2545: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((char *)p + len + 1 + ML_EXTRA, "%06d", data/vim-8.2.1913/src/tag.c:3241:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tagp->tagline = atoi((char *)p + 5); data/vim-8.2.1913/src/tee/tee.c:90: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[BUFSIZ]; data/vim-8.2.1913/src/tee/tee.c:130:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filepointers[i] = fopen(argv[i+optind], append ? "ab" : "wb"); data/vim-8.2.1913/src/term.c:1595: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((char *)nr_colors, "%d", t_colors); data/vim-8.2.1913/src/term.c:2416: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 buf[30]; data/vim-8.2.1913/src/term.c:2663:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int duration = atoi((char *)s + 2); data/vim-8.2.1913/src/term.c:2891:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[20]; data/vim-8.2.1913/src/term.c:3000:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAX_COLOR_STR_LEN]; data/vim-8.2.1913/src/term.c:3190: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). t_colors = atoi((char *)T_CCO); data/vim-8.2.1913/src/term.c:3198:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int colors = atoi((char *)env_colors); data/vim-8.2.1913/src/term.c:3838:10: [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). fd_tr = fopen("termresponse.log", "w"); data/vim-8.2.1913/src/term.c:5363: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). n = atoi((char *)modifiers_start); data/vim-8.2.1913/src/term.c:5808: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((char *)result + dlen, "%ld", data/vim-8.2.1913/src/term.c:6152:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[11]; data/vim-8.2.1913/src/term.c:6169: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(buf, "\033P+q%02x%02x\033\\", key_name[0], key_name[1]); data/vim-8.2.1913/src/term.c:6223:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atoi((char *)str); data/vim-8.2.1913/src/term.c:6286: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 ksme_str[20]; data/vim-8.2.1913/src/term.c:6287: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 ksmr_str[20]; data/vim-8.2.1913/src/term.c:6288: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 ksmd_str[20]; data/vim-8.2.1913/src/term.c:6324:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[KSSIZE]; // save buffer in non-vtp mode data/vim-8.2.1913/src/term.c:6325:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vbuf[KSSIZE]; // save buffer in vtp mode data/vim-8.2.1913/src/term.c:6326:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char v2buf[KSSIZE]; // save buffer in vtp2 mode data/vim-8.2.1913/src/term.c:6327:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char arr[KSSIZE]; // real buffer data/vim-8.2.1913/src/term.c:6502:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINE_LEN]; data/vim-8.2.1913/src/term.c:6579:7: [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). fd = fopen((char *)fname, "rt"); data/vim-8.2.1913/src/terminal.c:273:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *rows = atoi((char *)wp->w_p_tws); data/vim-8.2.1913/src/terminal.c:274:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *cols = atoi((char *)p + 1); data/vim-8.2.1913/src/terminal.c:816:25: [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). opt.jo_term_rows = atoi((char *)ep + 1); data/vim-8.2.1913/src/terminal.c:822:25: [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). opt.jo_term_cols = atoi((char *)ep + 1); data/vim-8.2.1913/src/terminal.c:948: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 id_as_str[NUMBUFLEN]; data/vim-8.2.1913/src/terminal.c:1139: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[KEY_BUF_LEN]; data/vim-8.2.1913/src/terminal.c:2106:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[KEY_BUF_LEN]; data/vim-8.2.1913/src/terminal.c:2664:10: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(GetACP(), 0, (char*)mb, 2, &wc, 1) > 0) data/vim-8.2.1913/src/terminal.c:3445: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 buf[50]; data/vim-8.2.1913/src/terminal.c:4354:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/vim-8.2.1913/src/terminal.c:6026: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((char *)hexbuf, "#%02x%02x%02x", data/vim-8.2.1913/src/terminal.c:6946:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char in_name[80], out_name[80]; data/vim-8.2.1913/src/termlib.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 tcbuf[32]; // Temp buffer to handle data/vim-8.2.1913/src/termlib.c:220:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256], *ptr = buf; data/vim-8.2.1913/src/termlib.c:238:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ptr, buf[256]; data/vim-8.2.1913/src/termlib.c:242:9: [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). return atoi(buf); data/vim-8.2.1913/src/termlib.c:396: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[32]; data/vim-8.2.1913/src/termlib.c:537:2: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atol(const char *); data/vim-8.2.1913/src/testing.c:24:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NUMBUFLEN]; data/vim-8.2.1913/src/testing.c:36: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(buf, "line %ld", (long)SOURCING_LNUM); data/vim-8.2.1913/src/testing.c:237: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 buf[100]; data/vim-8.2.1913/src/testing.c:391:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line1[200]; data/vim-8.2.1913/src/testing.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 line2[200]; data/vim-8.2.1913/src/testing.c:706:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[200]; data/vim-8.2.1913/src/textobject.c:1359: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((char *)spat, "<%.*s\\>\\%%(\\_s\\_[^>]\\{-}\\_[^/]>\\|\\_s\\?>\\)\\c", len, p); data/vim-8.2.1913/src/textobject.c:1360: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((char *)epat, "</%.*s>\\c", len, p); data/vim-8.2.1913/src/time.c:21: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 tz_cache[64]; data/vim-8.2.1913/src/time.c:85: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 buf[50]; data/vim-8.2.1913/src/uninstall.c:29:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[10]; data/vim-8.2.1913/src/uninstall.c:202:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/uninstall.c:206:10: [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). fd = fopen(path, "r"); data/vim-8.2.1913/src/uninstall.c:257:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZE]; data/vim-8.2.1913/src/uninstall.c:262:10: [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). fd = fopen(buf, "r"); data/vim-8.2.1913/src/uninstall.c:274:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[BUFSIZE]; data/vim-8.2.1913/src/uninstall.c:285:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[BUFSIZE]; data/vim-8.2.1913/src/uninstall.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 icon[BUFSIZE]; data/vim-8.2.1913/src/uninstall.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 path[MAX_PATH]; data/vim-8.2.1913/src/uninstall.c:322:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char popup_path[MAX_PATH]; data/vim-8.2.1913/src/uninstall.c:399:10: [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). fd = fopen("gvim.exe", "r"); data/vim-8.2.1913/src/usercmd.c:482: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((char *)IObuff + len, "%ldc", cmd->uc_def); data/vim-8.2.1913/src/usercmd.c:490: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((char *)IObuff + len, "%ld", cmd->uc_def); data/vim-8.2.1913/src/usercmd.c:1493: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 num_buf[20]; data/vim-8.2.1913/src/usercmd.c:1500: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(num_buf, "%ld", num); data/vim-8.2.1913/src/userfunc.c:351: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((char*)name, "<lambda>%d", ++lambda_no); data/vim-8.2.1913/src/userfunc.c:749: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((char *)fname_buf + 3, "%ld_", data/vim-8.2.1913/src/userfunc.c:1466: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((char *)numbuf, "%d", ai + 1); data/vim-8.2.1913/src/userfunc.c:1804: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((char *)buf + 3, "%d_", sid); data/vim-8.2.1913/src/userfunc.c:2553: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((char *)sid_buf, "%ld_", (long)current_sctx.sc_sid); data/vim-8.2.1913/src/userfunc.c:2687:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nesting_def[MAX_FUNC_NESTING]; data/vim-8.2.1913/src/userfunc.c:3359: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 numbuf[20]; data/vim-8.2.1913/src/userfunc.c:3380: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(numbuf, "%d", ++func_nr); data/vim-8.2.1913/src/version.c:32:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__) data/vim-8.2.1913/src/version.c:4730:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. msg_puts_attr((char *)items[idx], HL_ATTR(HLF_W)); data/vim-8.2.1913/src/version.c:4733:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. msg_puts((char *)items[idx]); data/vim-8.2.1913/src/version.c:5215: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((char *)vers + 3, ".%d", highest_patch()); data/vim-8.2.1913/src/vim.h:2186:28: [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). # define mch_open(n, m, p) open((n), (m), (p)) data/vim-8.2.1913/src/vim.h:2187:26: [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). # define mch_fopen(n, p) fopen((n), (p)) data/vim-8.2.1913/src/vim9execute.c:3434:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/vim-8.2.1913/src/viminfo.c:85:9: [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). return atoi((char *)p); data/vim-8.2.1913/src/viminfo.c:262:8: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). len = atol((char *)virp->vir_line + off + 1); data/vim-8.2.1913/src/viminfo.c:348:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). col = (colnr_T)atoi((char *)tab); data/vim-8.2.1913/src/viminfo.c:353:10: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). lnum = atol((char *)tab); data/vim-8.2.1913/src/viminfo.c:903: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 cbuf[NUMBUFLEN]; data/vim-8.2.1913/src/viminfo.c:910: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(cbuf, "%d", c); data/vim-8.2.1913/src/viminfo.c:1254:26: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tv.vval.v_number = atol((char *)tab + 1); data/vim-8.2.1913/src/viminfo.c:1386: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((char *)numbuf, "%ld", data/vim-8.2.1913/src/winclip.c:149:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). *outlen = MultiByteToWideChar(cp, flags, in, inlen, 0, 0); data/vim-8.2.1913/src/winclip.c:154:2: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(cp, flags, in, inlen, *out, *outlen); data/vim-8.2.1913/src/winclip.c:329:6: [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(&metadata, meta_p, n); data/vim-8.2.1913/src/winclip.c:491:6: [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(lpszMemRaw + STRLEN(p_enc) + 1, str, txtlen + 1); data/vim-8.2.1913/src/winclip.c:530: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(lpszMemW, out, len * sizeof(WCHAR)); data/vim-8.2.1913/src/winclip.c:558: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(lpszMemVim, &metadata, sizeof(metadata)); data/vim-8.2.1913/src/xdiff/xemit.c:109:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, rec, len); data/vim-8.2.1913/src/xdiff/xemit.c:131: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 dummy[1]; data/vim-8.2.1913/src/xdiff/xemit.c:138: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[80]; data/vim-8.2.1913/src/xdiff/xemit.c:146: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, dummy[1]; data/vim-8.2.1913/src/xdiff/xutils.c:327: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[32]; data/vim-8.2.1913/src/xdiff/xutils.c:351: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[128]; data/vim-8.2.1913/src/xdiff/xutils.c:353: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(buf, "@@ -", 4); data/vim-8.2.1913/src/xdiff/xutils.c:359:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + nb, ",", 1); data/vim-8.2.1913/src/xdiff/xutils.c:365: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(buf + nb, " +", 2); data/vim-8.2.1913/src/xdiff/xutils.c:371:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + nb, ",", 1); data/vim-8.2.1913/src/xdiff/xutils.c:377: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(buf + nb, " @@", 3); data/vim-8.2.1913/src/xdiff/xutils.c:383:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + nb, func, funclen); data/vim-8.2.1913/src/xdiff/xutils.c:419: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(diff_env->xdf1.rchg + line1 - 1, env.xdf1.rchg, count1); data/vim-8.2.1913/src/xdiff/xutils.c:420: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(diff_env->xdf2.rchg + line2 - 1, env.xdf2.rchg, count2); data/vim-8.2.1913/src/xxd/xxd.c:176:34: [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). # define OPEN(name, mode, umask) open(name, mode) data/vim-8.2.1913/src/xxd/xxd.c:178:34: [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). # define OPEN(name, mode, umask) open(name, mode, umask) data/vim-8.2.1913/src/xxd/xxd.c:401:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char z[LLEN+1]; data/vim-8.2.1913/src/xxd/xxd.c:470:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char l[LLEN+1]; /* static because it may be too big for stack */ data/vim-8.2.1913/src/xxd/xxd.c:667:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(argv[1], BIN_READ(!revert))) == NULL) data/vim-8.2.1913/src/xxd/xxd.c:828:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. addrlen = sprintf(l, "%08ld:", data/vim-8.2.1913/src/xxd/xxd.c:831:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. addrlen = sprintf(l, "%08lx:", data/vim-8.2.1913/runtime/tools/blink.c:18:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(400000); /* on time */ data/vim-8.2.1913/runtime/tools/blink.c:21:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(250000); /* off time */ data/vim-8.2.1913/runtime/tools/ccfilter.c:127: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). CWDlen = strlen(CWD); data/vim-8.2.1913/runtime/tools/ccfilter.c:290: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). { Col = strlen(Line2)-1; data/vim-8.2.1913/runtime/tools/ccfilter.c:294:11: [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( Line, "\n" ); data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:169:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(name) + strlen(cmd) + 10; data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:169:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(name) + strlen(cmd) + 10; data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:184: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). length += strlen(property + length + 1) + 1; data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:359:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strncmp(name, p + 1, strlen(name)) == 0)) data/vim-8.2.1913/runtime/tools/xcmdsrv_client.c:575: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). int len = strlen(str); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:115:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (idx = (int)strlen(buf) - 1; idx >= 0; idx--) data/vim-8.2.1913/src/GvimExt/gvimext.cpp:332: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). len = (DWORD)strlen(szBuff); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:741:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:744:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(temp, title, BUFSIZE - 1 - strlen(temp)); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:744:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(temp, title, BUFSIZE - 1 - strlen(temp)); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:953:7: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((wcslen(cmdStrW) + wcslen(m_szFileUserClickedOn) + 2) < BUFSIZE) data/vim-8.2.1913/src/GvimExt/gvimext.cpp:953:25: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((wcslen(cmdStrW) + wcslen(m_szFileUserClickedOn) + 2) < BUFSIZE) data/vim-8.2.1913/src/GvimExt/gvimext.cpp:956:6: [1] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant character. wcscat(cmdStrW, L"\""); data/vim-8.2.1913/src/GvimExt/gvimext.cpp:1031:8: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = wcslen(cmdStrW) + wcslen(m_szFileUserClickedOn) + 4; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:1031:26: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = wcslen(cmdStrW) + wcslen(m_szFileUserClickedOn) + 4; data/vim-8.2.1913/src/GvimExt/gvimext.cpp:1045:2: [1] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant character. wcscat(cmdStrW, L"\""); data/vim-8.2.1913/src/bufwrite.c:1433:20: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask_save = umask(0); data/vim-8.2.1913/src/bufwrite.c:1439:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(umask_save); data/vim-8.2.1913/src/channel.c:57:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define sock_read(sd, buf, len) read(sd, buf, len) data/vim-8.2.1913/src/channel.c:59:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define fd_read(fd, buf, len) read(fd, buf, len) data/vim-8.2.1913/src/cindent.c:723: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). l = (int)strlen(skip[i]); data/vim-8.2.1913/src/dosinst.c:174:6: [1] (buffer) scanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. scanf("%99s", dummy); data/vim-8.2.1913/src/dosinst.c:195:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). runtimeidx = strlen(installdir) - strlen(VIM_VERSION_NODOT); data/vim-8.2.1913/src/dosinst.c:195:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). runtimeidx = strlen(installdir) - strlen(VIM_VERSION_NODOT); data/vim-8.2.1913/src/dosinst.c:249: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). plen = strlen(p); data/vim-8.2.1913/src/dosinst.c:251: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). qlen = strlen(q); data/vim-8.2.1913/src/dosinst.c:293: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). size_t indir_l = strlen(installdir); data/vim-8.2.1913/src/dosinst.c:309:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmpname = alloc(strlen(cp) + 1); data/vim-8.2.1913/src/dosinst.c:311: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). tmpname[strlen(tmpname) - 1] = 'x'; // .exe -> .exx data/vim-8.2.1913/src/dosinst.c:362:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). default_bat_dir = alloc(strlen(targets[i].oldbat) + 1); data/vim-8.2.1913/src/dosinst.c:391:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (vim != NULL && *vim != 0 && strlen(vim) < sizeof(buf)) data/vim-8.2.1913/src/dosinst.c:579:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). default_vim_dir = alloc(strlen(temp_string_buffer) + 1); data/vim-8.2.1913/src/dosinst.c:644:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void)getchar(); data/vim-8.2.1913/src/dosinst.c:926: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). choices[idx].text = alloc(strlen(fmt) + strlen(arg) - 1); data/vim-8.2.1913/src/dosinst.c:926:45: [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). choices[idx].text = alloc(strlen(fmt) + strlen(arg) - 1); data/vim-8.2.1913/src/dosinst.c:1001:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = p + strlen(p); data/vim-8.2.1913/src/dosinst.c:1005:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(names[count], p, s - p); data/vim-8.2.1913/src/dosinst.c:1418:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (LPBYTE)data, (DWORD)(1 + strlen(data))); data/vim-8.2.1913/src/dosinst.c:1792:6: [1] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). Risk is very low, the length appears to be in characters not bytes. MultiByteToWideChar(CP_ACP, 0, shortcut_name, -1, wsz, sizeof(wsz)/sizeof(wsz[0])); data/vim-8.2.1913/src/dosinst.c:2105:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). long path_length = strlen(path); data/vim-8.2.1913/src/dosinst.c:2117:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(to, path, (size_t)last_char_to_copy); data/vim-8.2.1913/src/dosinst.c:2172: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). && strlen(homedrive) + strlen(homepath) < sizeof(buf)) data/vim-8.2.1913/src/dosinst.c:2172:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && strlen(homedrive) + strlen(homepath) < sizeof(buf)) data/vim-8.2.1913/src/dosinst.c:2196:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, var + 1, p - (var + 1)); data/vim-8.2.1913/src/dosinst.c:2200: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). && strlen(exp) + strlen(p) < sizeof(buf)) data/vim-8.2.1913/src/dosinst.c:2200: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). && strlen(exp) + strlen(p) < sizeof(buf)) data/vim-8.2.1913/src/dosinst.c:2645:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/vim-8.2.1913/src/dosinst.c:2758:10: [1] (buffer) scanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (scanf("%99s", buf) == 1) data/vim-8.2.1913/src/dosinst.h:116:8: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void)getchar(); data/vim-8.2.1913/src/dosinst.h:175: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 = alloc(strlen(p) + 1); data/vim-8.2.1913/src/dosinst.h:412:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name); data/vim-8.2.1913/src/dosinst.h:415:2: [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(name, "\\"); data/vim-8.2.1913/src/dosinst.h:471:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = strlen(path) - 1; i > 0; --i) data/vim-8.2.1913/src/evalfunc.c:6772:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buf.contents.bytes, sizeof(UINT32_T)) data/vim-8.2.1913/src/fileio.c:5091:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t umask_save = umask(077); data/vim-8.2.1913/src/fileio.c:5098:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(umask_save); data/vim-8.2.1913/src/fileio.c:5129:20: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask_save = umask(077); data/vim-8.2.1913/src/fileio.c:5133:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(umask_save); data/vim-8.2.1913/src/fileio.c:5173:5: [1] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant character. wcscpy(itmp, L""); data/vim-8.2.1913/src/getchar.c:3463:32: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (got_int || (script_char = getc(scriptin[curscript])) < 0) data/vim-8.2.1913/src/gui_at_fs.c:262:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2); data/vim-8.2.1913/src/gui_at_fs.c:275: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). dir->nChars = strlen(cannotOpen); data/vim-8.2.1913/src/gui_at_fs.c:284:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/vim-8.2.1913/src/gui_at_fs.c:288:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. (void) strncat(SFcurrentPath, str, len - 1); data/vim-8.2.1913/src/gui_at_fs.c:289:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir))) data/vim-8.2.1913/src/gui_at_fs.c:292:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). SFsetText(&(SFcurrentPath[strlen(SFstartDir)])); data/vim-8.2.1913/src/gui_at_fs.c:306:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/vim-8.2.1913/src/gui_at_fs.c:361:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/vim-8.2.1913/src/gui_at_fs.c:379: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). last = strlen(name) - 1; data/vim-8.2.1913/src/gui_at_fs.c:394: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). last = strlen(name) - 1; data/vim-8.2.1913/src/gui_at_fs.c:413:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (str[strlen(str) - 1] == '/') data/vim-8.2.1913/src/gui_at_fs.c:481:12: [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. (void) strcpy(entries[0].real, "~"); data/vim-8.2.1913/src/gui_at_fs.c:501: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(pw->pw_name); data/vim-8.2.1913/src/gui_at_fs.c:503:16: [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. (void) strcat(strcpy(entries[i].real, "~"), pw->pw_name); data/vim-8.2.1913/src/gui_at_fs.c:529:8: [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. (void)strcat(entries[i].real, "/"); data/vim-8.2.1913/src/gui_at_fs.c:548:20: [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. (void) strcat(strcat(strcpy(SFcurrentPath, data/vim-8.2.1913/src/gui_at_fs.c:772: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). text.length = strlen(path); data/vim-8.2.1913/src/gui_at_fs.c:787: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). (XawTextPosition)strlen(SFtextBuffer), &text); data/vim-8.2.1913/src/gui_at_fs.c:789: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). (XawTextPosition)strlen(SFtextBuffer)); data/vim-8.2.1913/src/gui_at_fs.c:793: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). (XawTextPosition)strlen(SFtextBuffer), &text); data/vim-8.2.1913/src/gui_at_fs.c:795:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (XawTextPosition)strlen(SFtextBuffer)); data/vim-8.2.1913/src/gui_at_fs.c:913: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). last = strlen(str) - 1; data/vim-8.2.1913/src/gui_at_fs.c:1289: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). last = strlen(entry->real) - 1; data/vim-8.2.1913/src/gui_at_fs.c:1309:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(shown); data/vim-8.2.1913/src/gui_at_fs.c:1372:3: [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). strlen(entry->shown)); data/vim-8.2.1913/src/gui_at_fs.c:1381:3: [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). strlen(entry->shown)); data/vim-8.2.1913/src/gui_at_fs.c:1443:3: [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). strlen(dir->dir)); data/vim-8.2.1913/src/gui_at_fs.c:1452:3: [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). strlen(dir->dir)); data/vim-8.2.1913/src/gui_at_fs.c:1895:45: [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(SFcurrentPath, SFstartDir, strlen(SFstartDir))) data/vim-8.2.1913/src/gui_at_fs.c:1897: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). pos -= strlen(SFstartDir); data/vim-8.2.1913/src/gui_at_fs.c:2005: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). maxChars = strlen(dir->dir) - 1; data/vim-8.2.1913/src/gui_at_fs.c:2034: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(str); data/vim-8.2.1913/src/gui_at_fs.c:2036:9: [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. (void) strcat(strcpy(result[i].real, str), " "); data/vim-8.2.1913/src/gui_at_fs.c:2569:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) wcstombs(SFcurrentPath + strlen(SFcurrentPath), wcbuf, MAXPATHL); data/vim-8.2.1913/src/gui_at_fs.c:2571:59: [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). SFtextPos = XawTextGetInsertionPoint(selFileField) + strlen(SFstartDir); data/vim-8.2.1913/src/gui_at_fs.c:2585:55: [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). SFtextPos = XawTextGetInsertionPoint(selFileField) + strlen(SFstartDir); data/vim-8.2.1913/src/gui_at_fs.c:2681:11: [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. (void)strcat(SFstartDir, "/"); data/vim-8.2.1913/src/gui_at_fs.c:2689:45: [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(SFcurrentPath, SFstartDir, strlen(SFstartDir))) data/vim-8.2.1913/src/gui_at_fs.c:2692:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). SFsetText(&(SFcurrentPath[strlen(SFstartDir)])); data/vim-8.2.1913/src/gui_at_fs.c:2697:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). SFsetText(&(SFcurrentPath[strlen(SFstartDir)])); data/vim-8.2.1913/src/gui_athena.c:347:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). from.size = strlen(from.addr = XtDefaultFontSet); data/vim-8.2.1913/src/gui_athena.c:351:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). from.size = strlen(from.addr = XtDefaultFont); data/vim-8.2.1913/src/gui_athena.c:1125:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pname = vim_strnsave(name, STRLEN(name) + strlen("-pullright")); data/vim-8.2.1913/src/gui_gtk_x11.c:454: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). len = strlen(option->name); data/vim-8.2.1913/src/gui_gtk_x11.c:2286:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(session_file); data/vim-8.2.1913/src/gui_haiku.cc:2380:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fFontFamily, *family, B_FONT_FAMILY_LENGTH); data/vim-8.2.1913/src/gui_haiku.cc:2381:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fFontStyle, *style, B_FONT_STYLE_LENGTH); data/vim-8.2.1913/src/gui_haiku.cc:2645:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(text, item->Text(), textSize); data/vim-8.2.1913/src/gui_haiku.cc:2654:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*fFamily, fFontFamily, B_FONT_FAMILY_LENGTH); data/vim-8.2.1913/src/gui_haiku.cc:2655:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*fStyle, fFontStyle, B_FONT_STYLE_LENGTH); data/vim-8.2.1913/src/gui_haiku.cc:4172: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). len = strlen(line); data/vim-8.2.1913/src/gui_w32.c:2439:23: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). infow.cch = (UINT)wcslen(wn); data/vim-8.2.1913/src/gui_w32.c:2679:6: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). wcsncpy(s_findrep_struct.lpstrFindWhat, p, len); data/vim-8.2.1913/src/gui_w32.c:3157: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). res = alloc(strlen(font_name) + 30 data/vim-8.2.1913/src/gui_w32.c:3158:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + (charset_name == NULL ? 0 : strlen(charset_name) + 2) data/vim-8.2.1913/src/gui_w32.c:3159:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + (quality_name == NULL ? 0 : strlen(quality_name) + 2)); data/vim-8.2.1913/src/gui_w32.c:4982:13: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)wcslen(wsession) * 2 + 27 + 1; data/vim-8.2.1913/src/gui_w32.c:5008:16: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)wcslen(name) + (int)wcslen(cmd) + (int)wcslen(warg) + 4; data/vim-8.2.1913/src/gui_w32.c:5008:36: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)wcslen(name) + (int)wcslen(cmd) + (int)wcslen(warg) + 4; data/vim-8.2.1913/src/gui_w32.c:5008:55: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)wcslen(name) + (int)wcslen(cmd) + (int)wcslen(warg) + 4; data/vim-8.2.1913/src/gui_w32.c:6398:20: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). infow.cch = (UINT)wcslen(wn); data/vim-8.2.1913/src/gui_w32.c:6666:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define add_string(s) strcpy((LPSTR)p, s); (LPSTR)p += (strlen((LPSTR)p) + 1) data/vim-8.2.1913/src/gui_w32.c:7111:19: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1; data/vim-8.2.1913/src/gui_w32.c:7349:19: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nChar = (int)wcslen(wn) + 1; data/vim-8.2.1913/src/gui_w32.c:7696:19: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1; data/vim-8.2.1913/src/gui_x11.c:1610: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). from.size = strlen(from.addr); data/vim-8.2.1913/src/gui_x11.c:1630: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). from.size = strlen(from.addr); data/vim-8.2.1913/src/gui_x11.c:1640: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). from.size = strlen(from.addr); data/vim-8.2.1913/src/gui_xim.c:1402: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). end = s + strlen(s); data/vim-8.2.1913/src/gui_xim.c:1407: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(s) <= IMLEN_MAX) data/vim-8.2.1913/src/gui_xim.c:1472: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). end = s + strlen(s); data/vim-8.2.1913/src/gui_xmdlg.c:209: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(buf, "-"); data/vim-8.2.1913/src/gui_xmdlg.c:241:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (buf[strlen(buf) - 1] == '0') data/vim-8.2.1913/src/gui_xmdlg.c:266: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(buf, "-"); data/vim-8.2.1913/src/hardcopy.c:1562:5: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf((char *)prt_line_buffer, " "); data/vim-8.2.1913/src/hardcopy.c:2464:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mbfont_opts[OPT_MBFONT_REGULAR].strlen)) data/vim-8.2.1913/src/hardcopy.c:2469:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mbfont_opts[OPT_MBFONT_BOLD].strlen)) data/vim-8.2.1913/src/hardcopy.c:2474:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mbfont_opts[OPT_MBFONT_OBLIQUE].strlen)) data/vim-8.2.1913/src/hardcopy.c:2479:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mbfont_opts[OPT_MBFONT_BOLDOBLIQUE].strlen)) data/vim-8.2.1913/src/hardcopy.c:2512:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). paper_strlen = printer_opts[OPT_PRINT_PAPER].strlen; data/vim-8.2.1913/src/help.c:300:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p1 = *(char **)s1 + strlen(*(char **)s1) + 1; data/vim-8.2.1913/src/help.c:301:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p2 = *(char **)s2 + strlen(*(char **)s2) + 1; data/vim-8.2.1913/src/if_cscope.c:466: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). char *buf = alloc(strlen(stat_emsg) + MAXPATHL + 10); data/vim-8.2.1913/src/if_cscope.c:540: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). fname2 = alloc(strlen(CSCOPE_DBFILE) + strlen(fname) + 2); data/vim-8.2.1913/src/if_cscope.c:540:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fname2 = alloc(strlen(CSCOPE_DBFILE) + strlen(fname) + 2); data/vim-8.2.1913/src/if_cscope.c:544: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). while (fname[strlen(fname)-1] == '/' data/vim-8.2.1913/src/if_cscope.c:546: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). || fname[strlen(fname)-1] == '\\' data/vim-8.2.1913/src/if_cscope.c:550: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). fname[strlen(fname)-1] = '\0'; data/vim-8.2.1913/src/if_cscope.c:766: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 ((cmd = alloc(strlen(pat) + 2)) == NULL) data/vim-8.2.1913/src/if_cscope.c:878:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)(strlen(prog) + strlen(csinfo[i].fname) + 32); data/vim-8.2.1913/src/if_cscope.c:878:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)(strlen(prog) + strlen(csinfo[i].fname) + 32); data/vim-8.2.1913/src/if_cscope.c:894:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += (int)strlen(ppath); data/vim-8.2.1913/src/if_cscope.c:898:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += (int)strlen(csinfo[i].flags); data/vim-8.2.1913/src/if_cscope.c:926:12: [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. (void)strcat(cmd, " "); data/vim-8.2.1913/src/if_cscope.c:1036: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). pat = opt + strlen(opt) + 1; data/vim-8.2.1913/src/if_cscope.c:1118:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *buf = alloc(strlen(nf)); data/vim-8.2.1913/src/if_cscope.c:1189:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = alloc(strlen(opt) + strlen(pat) + strlen(nf)); data/vim-8.2.1913/src/if_cscope.c:1189:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = alloc(strlen(opt) + strlen(pat) + strlen(nf)); data/vim-8.2.1913/src/if_cscope.c:1189:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = alloc(strlen(opt) + strlen(pat) + strlen(nf)); data/vim-8.2.1913/src/if_cscope.c:1447:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((csinfo[i].fname = alloc(strlen(fname)+1)) == NULL) data/vim-8.2.1913/src/if_cscope.c:1454: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 ((csinfo[i].ppath = alloc(strlen(ppath) + 1)) == NULL) data/vim-8.2.1913/src/if_cscope.c:1465: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 ((csinfo[i].flags = alloc(strlen(flags) + 1)) == NULL) data/vim-8.2.1913/src/if_cscope.c:1507:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(stok); data/vim-8.2.1913/src/if_cscope.c:1533: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(stok) < 2 && VIM_ISDIGIT((int)(stok[0]))) data/vim-8.2.1913/src/if_cscope.c:1534: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). || (strlen(stok) < 3 && stok[0] == '-' data/vim-8.2.1913/src/if_cscope.c:1629:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + strlen(search)+6); data/vim-8.2.1913/src/if_cscope.c:1629:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + strlen(search)+6); data/vim-8.2.1913/src/if_cscope.c:1629:45: [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). amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + strlen(search)+6); data/vim-8.2.1913/src/if_cscope.c:1629:62: [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). amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + strlen(search)+6); data/vim-8.2.1913/src/if_cscope.c:1637:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + 5); data/vim-8.2.1913/src/if_cscope.c:1637:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + 5); data/vim-8.2.1913/src/if_cscope.c:1637:45: [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). amt = (int)(strlen(fname) + strlen(slno) + strlen(tagstr) + 5); data/vim-8.2.1913/src/if_cscope.c:1755:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getc(csinfo[cnumber].fr_fp)) != EOF && ch != '\n') data/vim-8.2.1913/src/if_cscope.c:1772:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *search = *linenumber + strlen(*linenumber) + 1; // +1 to skip \0 data/vim-8.2.1913/src/if_cscope.c:1814:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). context = alloc(strlen(cntx)+5); data/vim-8.2.1913/src/if_cscope.c:1932: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). s = path + strlen(path) - 1; data/vim-8.2.1913/src/if_cscope.c:1970: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 ((tbuf = alloc(strlen(matches[0]) + 1)) == NULL) data/vim-8.2.1913/src/if_cscope.c:1981:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newsize = (int)(strlen(cstag_msg) + strlen(ptag)); data/vim-8.2.1913/src/if_cscope.c:1981:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newsize = (int)(strlen(cstag_msg) + strlen(ptag)); data/vim-8.2.1913/src/if_cscope.c:2004:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((tbuf = alloc(strlen(matches[idx]) + 1)) == NULL) data/vim-8.2.1913/src/if_cscope.c:2017: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). lno[strlen(lno)-2] = '\0'; // ignore ;" at the end data/vim-8.2.1913/src/if_cscope.c:2020:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newsize = (int)(strlen(csfmt_str) + 16 + strlen(lno)); data/vim-8.2.1913/src/if_cscope.c:2020:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newsize = (int)(strlen(csfmt_str) + 16 + strlen(lno)); data/vim-8.2.1913/src/if_cscope.c:2047:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newsize = (int)(strlen(context) + strlen(cntxformat)); data/vim-8.2.1913/src/if_cscope.c:2047:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newsize = (int)(strlen(context) + strlen(cntxformat)); data/vim-8.2.1913/src/if_cscope.c:2066:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (msg_col + (int)strlen(buf) >= (int)Columns) data/vim-8.2.1913/src/if_cscope.c:2109:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int epromptlen = (int)strlen(eprompt); data/vim-8.2.1913/src/if_cscope.c:2114:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). maxlen = (int)(IOSIZE - strlen(cs_emsg)); data/vim-8.2.1913/src/if_cscope.c:2118:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getc(csinfo[i].fr_fp)) != EOF && ch != CSCOPE_PROMPT[0]) data/vim-8.2.1913/src/if_cscope.c:2149: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). for (n = 0; n < (int)strlen(CSCOPE_PROMPT); ++n) data/vim-8.2.1913/src/if_cscope.c:2152:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(csinfo[i].fr_fp); data/vim-8.2.1913/src/if_cscope.c:2402:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)(strlen(name) + 2); data/vim-8.2.1913/src/if_cscope.c:2404:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += (int)strlen(csinfo[i].ppath); data/vim-8.2.1913/src/if_cscope.c:2423:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0) data/vim-8.2.1913/src/if_lua.c:755:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). luaV_addlstring(&b, s, strlen(s), 0); data/vim-8.2.1913/src/if_lua.c:2382:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (luaL_loadbuffer(L, s, strlen(s), LUAVIM_CHUNKNAME) data/vim-8.2.1913/src/if_lua.c:2408:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). luaL_addlstring(&b, s, strlen(s)); data/vim-8.2.1913/src/if_ole.cpp:686:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buffer, "\\"); data/vim-8.2.1913/src/if_python.c:1455: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). PyInt len = strlen(str); data/vim-8.2.1913/src/if_python3.c:1090:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmdstr = PyUnicode_Decode(cmd, strlen(cmd), data/vim-8.2.1913/src/if_python3.c:1725: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). Py_ssize_t len = strlen(str); data/vim-8.2.1913/src/if_ruby.c:840:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return rb_enc_str_new(s, (long)strlen(s), enc); data/vim-8.2.1913/src/libvterm/src/parser.c:53:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(seq, vt->parser.intermed, len); data/vim-8.2.1913/src/libvterm/t/harness.c:8:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define strstartswith(a,b) (!strncmp(a,b,strlen(b))) data/vim-8.2.1913/src/menu.c:1740:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int mode_chars_len = (int)strlen(mode_chars); data/vim-8.2.1913/src/menu.c:1979:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mode_len = (int)strlen(mode); data/vim-8.2.1913/src/message.c:4487: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). str_arg_l = strlen(str_arg); data/vim-8.2.1913/src/misc2.c:3425:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (name[strlen(name) - 1] != '/') data/vim-8.2.1913/src/misc2.c:4019: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). p = alloc(strlen(string) + 1); data/vim-8.2.1913/src/misc2.c:4026:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = vim_realloc(environ[i], strlen(string) + 1); data/vim-8.2.1913/src/misc2.c:4073: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). elem = alloc(strlen(environ[i]) + 1); data/vim-8.2.1913/src/misc2.c:4171:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = getc(fd); data/vim-8.2.1913/src/misc2.c:4173:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/misc2.c:4187:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = getc(fd); data/vim-8.2.1913/src/misc2.c:4189:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/misc2.c:4192:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/misc2.c:4209:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/misc2.c:4212:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/misc2.c:4215:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/misc2.c:4218:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/misc2.c:4242:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/netbeans.c:2323: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(tok) + i < KEYBUFLEN) data/vim-8.2.1913/src/netbeans.c:2443:2: [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(buf, "C"); data/vim-8.2.1913/src/netbeans.c:2445:2: [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(buf, "S"); data/vim-8.2.1913/src/netbeans.c:2447:2: [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(buf, "M"); // META data/vim-8.2.1913/src/netbeans.c:2449:2: [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(buf, "-"); data/vim-8.2.1913/src/os_amiga.c:499: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). Write(fh, av, (long)strlen(av)); data/vim-8.2.1913/src/os_amiga.c:583:6: [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(fib->fib_FileName, ":"); data/vim-8.2.1913/src/os_amiga.c:585:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (flen == strlen(fib->fib_FileName)) // safety check data/vim-8.2.1913/src/os_mswin.c:921: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 (psz[strlen(psz) - 1] != '\n') data/vim-8.2.1913/src/os_mswin.c:1719:22: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = q = fname + wcslen(fname); data/vim-8.2.1913/src/os_mswin.c:1724:2: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). wcsncpy(buf, fname, q - fname); data/vim-8.2.1913/src/os_mswin.c:2969:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (utf16ascncmp(p, cp->name, strlen(cp->name)) == 0) data/vim-8.2.1913/src/os_mswin.c:2972:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(cp->name); data/vim-8.2.1913/src/os_mswin.c:2989:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (utf16ascncmp(p, qp->name, strlen(qp->name)) == 0) data/vim-8.2.1913/src/os_mswin.c:2992:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(qp->name); data/vim-8.2.1913/src/os_unix.c:635:6: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep((unsigned int)(999 * 1000)); data/vim-8.2.1913/src/os_unix.c:638:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep((unsigned int)(msec * 1000)); data/vim-8.2.1913/src/os_unix.h:114: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). # define NAMLEN(dirent) strlen((dirent)->d_name) data/vim-8.2.1913/src/os_vms.c:99: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). des->dsc$w_length = str ? strlen(str) : 0; data/vim-8.2.1913/src/os_vms.c:247: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). lengte = strlen(sbuf) + 1; data/vim-8.2.1913/src/os_vms.c:271:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). vul_item(&itmlst.equ, value ? strlen(value) : 0, value ? LNM$_STRING : 0, data/vim-8.2.1913/src/os_vms.c:304:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i,nlen = strlen(name); data/vim-8.2.1913/src/os_vms.c:353:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(inbuf); // how many chars we got? data/vim-8.2.1913/src/os_vms.c:360:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(inbuf); // return the total length data/vim-8.2.1913/src/os_vms.c:559:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(out, in, len); data/vim-8.2.1913/src/os_vms.c:654:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(instring) + 1; data/vim-8.2.1913/src/os_vms_mms.c:39: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(target, " "); data/vim-8.2.1913/src/os_vms_mms.c:53: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). buf[strlen(buf)-1] = '\0'; data/vim-8.2.1913/src/os_vms_mms.c:66: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). buf[strlen(buf)-1] = '\0'; data/vim-8.2.1913/src/os_win32.c:4752:8: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((wcslen(szShellTitle) + wcslen(wn) < data/vim-8.2.1913/src/os_win32.c:4752:31: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((wcslen(szShellTitle) + wcslen(wn) < data/vim-8.2.1913/src/os_win32.c:5113:21: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lkey = wcslen(wkey); data/vim-8.2.1913/src/os_win32.c:5114:21: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lval = wcslen(wval); data/vim-8.2.1913/src/os_win32.c:7091:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char newMode = mode[strlen(mode) - 1]; data/vim-8.2.1913/src/os_win32.c:7141:23: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). to_name = malloc((wcslen(to) + wcslen(substream) + 1) * sizeof(WCHAR)); data/vim-8.2.1913/src/os_win32.c:7141:36: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). to_name = malloc((wcslen(to) + wcslen(substream) + 1) * sizeof(WCHAR)); data/vim-8.2.1913/src/os_win32.c:7399:23: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ArglistW[i], (int)wcslen(ArglistW[i]) + 1, data/vim-8.2.1913/src/spellfile.c:410:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buf[i] = getc(fd); // <fileID> data/vim-8.2.1913/src/spellfile.c:416:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <versionnr> data/vim-8.2.1913/src/spellfile.c:435:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = getc(fd); // <sectionID> or <sectionend> data/vim-8.2.1913/src/spellfile.c:438:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <sectionflags> data/vim-8.2.1913/src/spellfile.c:535:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(fd) < 0) data/vim-8.2.1913/src/spellfile.c:706:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buf[i] = getc(fd); // <fileID> data/vim-8.2.1913/src/spellfile.c:713:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <versionnr> data/vim-8.2.1913/src/spellfile.c:774:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <sugline> data/vim-8.2.1913/src/spellfile.c:820:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc(fd); data/vim-8.2.1913/src/spellfile.c:851:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lp->sl_regions[i] = getc(fd); // <regionname> data/vim-8.2.1913/src/spellfile.c:920:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = getc(fd); // <condlen> data/vim-8.2.1913/src/spellfile.c:931:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *p++ = getc(fd); // <condstr> data/vim-8.2.1913/src/spellfile.c:1004:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = getc(fd); // <salflags> data/vim-8.2.1913/src/spellfile.c:1027:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ccnt = getc(fd); // <salfromlen> data/vim-8.2.1913/src/spellfile.c:1037:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <salfrom> data/vim-8.2.1913/src/spellfile.c:1051:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <salfrom> data/vim-8.2.1913/src/spellfile.c:1058:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/spellfile.c:1069:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *p++ = getc(fd); // <salfrom> data/vim-8.2.1913/src/spellfile.c:1153:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/spellfile.c:1232:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <compmax> data/vim-8.2.1913/src/spellfile.c:1238:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <compminlen> data/vim-8.2.1913/src/spellfile.c:1244:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <compsylmax> data/vim-8.2.1913/src/spellfile.c:1249:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <compoptions> data/vim-8.2.1913/src/spellfile.c:1255:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // only use the lower byte for now data/vim-8.2.1913/src/spellfile.c:1322:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <compflags> data/vim-8.2.1913/src/spellfile.c:1650:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = getc(fd); // <siblingcount> data/vim-8.2.1913/src/spellfile.c:1661:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <byte> data/vim-8.2.1913/src/spellfile.c:1681:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd) << 24; // <pflags> data/vim-8.2.1913/src/spellfile.c:1685:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c |= getc(fd); // <affixID> data/vim-8.2.1913/src/spellfile.c:1698:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <flags> data/vim-8.2.1913/src/spellfile.c:1700:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = (getc(fd) << 8) + c; // <flags2> data/vim-8.2.1913/src/spellfile.c:1702:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = (getc(fd) << 16) + c; // <region> data/vim-8.2.1913/src/spellfile.c:1704:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = (getc(fd) << 24) + c; // <affixID> data/vim-8.2.1913/src/spellfile.c:1717:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); // <xbyte> data/vim-8.2.1913/src/structs.h:3909: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). int strlen; data/vim-8.2.1913/src/tee/tee.c:70:28: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n < max) && ((c = getchar()) != EOF)) data/vim-8.2.1913/src/term.c:6609:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(line); data/vim-8.2.1913/src/terminal.c:4868:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4876:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4904:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4919:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4924:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4947:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4951:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4960:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4970:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4976:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4978:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4980:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4982:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4984:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4986:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4988:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:4994:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:5054:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:5070:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fd); data/vim-8.2.1913/src/terminal.c:6372:9: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). breq = wcslen(cmd_wchar) + 1 + 1; // Addition of NUL by API data/vim-8.2.1913/src/terminal.c:6374:2: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). wcsncpy(cmd_wchar_copy, cmd_wchar, breq - 1); data/vim-8.2.1913/src/termlib.c:96: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). int tlen = strlen(term); data/vim-8.2.1913/src/termlib.c:129: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). len = strlen(tbuf); data/vim-8.2.1913/src/termlib.c:146: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). int tlen = strlen(term); data/vim-8.2.1913/src/termlib.c:183:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int llen = strlen(lbuf); data/vim-8.2.1913/src/termlib.c:277:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(id); data/vim-8.2.1913/src/testing.c:420:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c1 = fgetc(fd1); data/vim-8.2.1913/src/testing.c:421:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c2 = fgetc(fd2); data/vim-8.2.1913/src/time.c:104:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). acp_to_enc((char_u *)buf, (int)strlen(buf), &to_free, &len); data/vim-8.2.1913/src/time.c:945:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/vim-8.2.1913/src/ui.c:950:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(read_cmd_fd, (char *)inbuf + inbufcount, readlen); data/vim-8.2.1913/src/undo.c:1081:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return getc(bi->bi_fp); data/vim-8.2.1913/src/uninstall.c:203: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). int key_len = strlen(VIMBAT_UNINSTKEY); data/vim-8.2.1913/src/uninstall.c:419:8: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void)getchar(); data/vim-8.2.1913/src/version.c:47: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(longVersion, " "); data/vim-8.2.1913/src/version.c:50: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(longVersion, ")"); data/vim-8.2.1913/src/version.c:65: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). size_t len = strlen(msg) data/vim-8.2.1913/src/version.c:66: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). + strlen(VIM_VERSION_LONG_ONLY) data/vim-8.2.1913/src/version.c:67: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). + strlen(VIM_VERSION_DATE_ONLY) data/vim-8.2.1913/src/version.c:68: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). + strlen(date_time); data/vim-8.2.1913/src/vim.h:1585: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). #define STRLEN(s) strlen((char *)(s)) data/vim-8.2.1913/src/vim.h:1587:29: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) data/vim-8.2.1913/src/vim.h:1628:29: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. #define STRNCAT(d, s, n) strncat((char *)(d), (char *)(s), (size_t)(n)) data/vim-8.2.1913/src/vim.h:1731:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define vim_read(fd, buf, count) read((fd), (char *)(buf), (unsigned int)(count)) data/vim-8.2.1913/src/vim.h:1734:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define vim_read(fd, buf, count) read((fd), (char *)(buf), (size_t) (count)) data/vim-8.2.1913/src/vim9execute.c:3453:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, "?"); data/vim-8.2.1913/src/viminfo.c:3195:20: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask_save = umask(077); data/vim-8.2.1913/src/viminfo.c:3197:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(umask_save); data/vim-8.2.1913/src/viminfo.c:3207:20: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask_save = umask(0); data/vim-8.2.1913/src/viminfo.c:3211:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(umask_save); data/vim-8.2.1913/src/vimrun.c:70:31: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). WriteConsoleW(hstdout, p, wcslen(p), &written, NULL); data/vim-8.2.1913/src/vimrun.c:76:14: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmdlen = wcslen(p); data/vim-8.2.1913/src/winclip.c:686:17: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len_loc = (int)wcslen(str) + 1; data/vim-8.2.1913/src/xdiff/xemit.c:34: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). long size, psize = (long)strlen(pre); data/vim-8.2.1913/src/xdiff/xpatience.c:83:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(line, xpp->anchors[i], strlen(xpp->anchors[i]))) data/vim-8.2.1913/src/xdiff/xutils.c:54: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). mb[2].size = (long)strlen(mb[2].ptr); data/vim-8.2.1913/src/xxd/xxd.c:176:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). # define OPEN(name, mode, umask) open(name, mode) data/vim-8.2.1913/src/xxd/xxd.c:178:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). # define OPEN(name, mode, umask) open(name, mode, umask) data/vim-8.2.1913/src/xxd/xxd.c:178:51: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). # define OPEN(name, mode, umask) open(name, mode, umask) data/vim-8.2.1913/src/xxd/xxd.c:280:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fpi)) != EOF) data/vim-8.2.1913/src/xxd/xxd.c:355:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fpi)) != '\n' && c != EOF) data/vim-8.2.1913/src/xxd/xxd.c:367:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fpi)) != '\n' && c != EOF) data/vim-8.2.1913/src/xxd/xxd.c:723:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(fp) == EOF) data/vim-8.2.1913/src/xxd/xxd.c:753:49: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((length < 0 || p < length) && (c = getc(fp)) != EOF) data/vim-8.2.1913/src/xxd/xxd.c:790:49: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((length < 0 || n < length) && (e = getc(fp)) != EOF) data/vim-8.2.1913/src/xxd/xxd.c:823:45: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((length < 0 || n < length) && (e = getc(fp)) != EOF) ANALYSIS SUMMARY: Hits = 1522 Lines analyzed = 501769 in approximately 9.73 seconds (51559 lines/second) Physical Source Lines of Code (SLOC) = 374954 Hits@level = [0] 796 [1] 366 [2] 773 [3] 52 [4] 327 [5] 4 Hits@level+ = [0+] 2318 [1+] 1522 [2+] 1156 [3+] 383 [4+] 331 [5+] 4 Hits/KSLOC@level+ = [0+] 6.18209 [1+] 4.05916 [2+] 3.08304 [3+] 1.02146 [4+] 0.882775 [5+] 0.010668 Dot directories skipped = 2 (--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.