aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2025-07-06 20:27:20 +0800
committerGitHub <noreply@github.com>2025-07-06 20:27:20 +0800
commit09f9d72c249588252f44d2fa5eddd50436acd6ba (patch)
treeb76ff04bd7de38036585db00734a01d7510d953b /runtime/lua
parentcf5506f0fde13e61398b6a5121a5c673b0646765 (diff)
downloadrneovim-09f9d72c249588252f44d2fa5eddd50436acd6ba.tar.gz
rneovim-09f9d72c249588252f44d2fa5eddd50436acd6ba.tar.bz2
rneovim-09f9d72c249588252f44d2fa5eddd50436acd6ba.zip
fix(runtime): coverity STRING_NULL #569464 (#34795)
Problem: Coverity reports string null termination issue: *** CID 569464: Memory - string handling (STRING_NULL) /src/nvim/runtime.c: 1374 in ExpandRTDir_int() 1372 if (flags & DIP_START) { 1373 memcpy(tail - 15, "pack/*/start/*/", 15); // NOLINT >>> CID 569464: Memory - string handling (STRING_NULL) >>> Passing unterminated string "tail - 15" to "globpath", which expects a null-terminated string. 1374 globpath(p_pp, tail - 15, gap, glob_flags, expand_dirs); Similar issues occur at lines 1376, 1381, and 1383 where memcpy() constructs strings passed to globpath() without null termination. Solution: Replace dangerous pointer arithmetic and memcpy() with direct snprintf() construction of complete search paths. This eliminates the need for buffer reuse through pointer offsets and ensures all strings passed to globpath() are properly null-terminated. vim-patch:9.1.1515: Coverity complains about potential unterminated strings
Diffstat (limited to 'runtime/lua')
0 files changed, 0 insertions, 0 deletions