From 5f0c76b243aca8d5fcab15c24bf2b0ba33852155 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Fri, 25 Mar 2016 14:17:10 -0400 Subject: 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 --- src/nvim/eval.c | 2 ++ src/nvim/version.c | 1 + 2 files changed, 3 insertions(+) (limited to 'src') 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; diff --git a/src/nvim/version.c b/src/nvim/version.c index 98abb30b00..b7e5f1f2ef 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -69,6 +69,7 @@ static char *features[] = { // clang-format off static int included_patches[] = { + 1641, 1574, 1570, 1511, -- cgit