diff options
author | James McCoy <jamessan@jamessan.com> | 2016-03-25 14:17:10 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-03-30 08:30:35 -0400 |
commit | 5f0c76b243aca8d5fcab15c24bf2b0ba33852155 (patch) | |
tree | 6b060737edf2481b93e674add7a8c0e23dc98a9b /src/nvim/eval.c | |
parent | a9e0d734d7b4aa6e6cd77e1834bbc7c6b59c716c (diff) | |
download | rneovim-5f0c76b243aca8d5fcab15c24bf2b0ba33852155.tar.gz rneovim-5f0c76b243aca8d5fcab15c24bf2b0ba33852155.tar.bz2 rneovim-5f0c76b243aca8d5fcab15c24bf2b0ba33852155.zip |
vim-patch:7.4.1641
Problem: Using unterminated string.
Solution: Add NUL before calling vim_strsave_shellescape(). (James McCoy)
https://github.com/vim/vim/commit/5ca84ce4aa2832041f843e624c222bbc1f4d3e14
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index f71620a7b4..3856edbef9 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -21993,6 +21993,8 @@ repeat: } if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S') { + // vim_strsave_shellescape() needs a NUL terminated string. + (*fnamep)[*fnamelen] = NUL; p = vim_strsave_shellescape(*fnamep, false, false); xfree(*bufp); *bufp = *fnamep = p; |