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 From e4d1bf7177e00eb41928bd17ae4c3c936f047053 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Fri, 25 Mar 2016 14:20:29 -0400 Subject: vim-patch:7.4.1643 Problem: Terminating file name has side effects. Solution: Restore the character. (mostly by James McCoy, closes vim/vim#713) https://github.com/vim/vim/commit/d4caf5c16a9f1c9477d426e58d8d3dc47ab5f066 --- 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 3856edbef9..fbde845f47 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -21994,8 +21994,10 @@ repeat: if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S') { // vim_strsave_shellescape() needs a NUL terminated string. + c = (*fnamep)[*fnamelen]; (*fnamep)[*fnamelen] = NUL; p = vim_strsave_shellescape(*fnamep, false, false); + (*fnamep)[*fnamelen] = c; xfree(*bufp); *bufp = *fnamep = p; *fnamelen = STRLEN(p); diff --git a/src/nvim/version.c b/src/nvim/version.c index b7e5f1f2ef..0889ba8ccf 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[] = { + 1643, 1641, 1574, 1570, -- cgit From 62c0d99474eb0dffcd36d227057755c16c8a9570 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Fri, 25 Mar 2016 14:28:03 -0400 Subject: vim-patch:7.4.1652 Problem: Old style test for fnamemodify(). Solution: Turn it into a new style test. https://github.com/vim/vim/commit/610cc1b9b3c8104382f5506606c1f87118c28114 --- src/nvim/version.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/nvim/version.c b/src/nvim/version.c index 0889ba8ccf..bab3d1573a 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[] = { + 1652, 1643, 1641, 1574, -- cgit From 7558f42f7d9900d37a1915ce78f1102ee251d420 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 28 Mar 2016 09:47:46 -0400 Subject: vim-patch:7.4.1654 Problem: Crash when using expand('%:S') in a buffer without a name. Solution: Don't set a NUL. (James McCoy, closes vim/vim#714) https://github.com/vim/vim/commit/52c6eaffd43a8c8865f8d6ed7cde0a8b137479e2 --- src/nvim/eval.c | 8 ++++++-- src/nvim/version.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index fbde845f47..3c67625d1c 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -21995,9 +21995,13 @@ repeat: if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S') { // vim_strsave_shellescape() needs a NUL terminated string. c = (*fnamep)[*fnamelen]; - (*fnamep)[*fnamelen] = NUL; + if (c != NUL) { + (*fnamep)[*fnamelen] = NUL; + } p = vim_strsave_shellescape(*fnamep, false, false); - (*fnamep)[*fnamelen] = c; + if (c != NUL) { + (*fnamep)[*fnamelen] = c; + } xfree(*bufp); *bufp = *fnamep = p; *fnamelen = STRLEN(p); diff --git a/src/nvim/version.c b/src/nvim/version.c index bab3d1573a..8cd0a13363 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[] = { + 1654, 1652, 1643, 1641, -- cgit