aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/executable_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-04-07 10:07:32 +0800
committerGitHub <noreply@github.com>2026-04-07 10:07:32 +0800
commit6b0367481c6542bebb47f6e9a6b4eb419708ddaf (patch)
tree78dcc882af011c3662eaa061077d9bd616809fe9 /test/functional/vimscript/executable_spec.lua
parente94e469324cca89485995dfcc1553c2b31268563 (diff)
downloadrneovim-6b0367481c6542bebb47f6e9a6b4eb419708ddaf.tar.gz
rneovim-6b0367481c6542bebb47f6e9a6b4eb419708ddaf.tar.bz2
rneovim-6b0367481c6542bebb47f6e9a6b4eb419708ddaf.zip
fix: don't make path empty when truncating trailing slashes (#38844)
Fixes the following Coverity warning: *** CID 549779: Integer handling issues (INTEGER_OVERFLOW) /src/nvim/undo.c: 717 in u_get_undo_file_name() 711 dir_name[dir_len] = NUL; 712 713 // Remove trailing pathseps from directory name 714 char *p = &dir_name[dir_len - 1]; 715 while (vim_ispathsep(*p)) { 716 *p-- = NUL; >>> CID 549779: Integer handling issues (INTEGER_OVERFLOW) >>> Expression "dir_len--", where "dir_len" is known to be equal to 0, underflows the type of "dir_len--", which is type "size_t". 717 dir_len--; 718 } 719 720 bool has_directory = os_isdir(dir_name); 721 if (!has_directory && *dirp == NUL && !reading) { 722 // Last directory in the list does not exist, create it.
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions