commit | 5ca84ce4aa2832041f843e624c222bbc1f4d3e14 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Wed Mar 23 22:28:25 2016 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Wed Mar 23 22:28:25 2016 +0100 |
tree | 8708b747cbb985a74cc4bd670142924106b59b31 | |
parent | ffec3c53496d49668669deabc0724ec78e2274fd [diff] [blame] |
patch 7.4.1641 Problem: Using unterminated string. Solution: Add NUL before calling vim_strsave_shellescape(). (James McCoy)
diff --git a/src/eval.c b/src/eval.c index 990fa8c..9091f79 100644 --- a/src/eval.c +++ b/src/eval.c
@@ -26439,6 +26439,8 @@ 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); if (p == NULL) return -1;