0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 7.4.1641

Problem:    Using unterminated string.
Solution:   Add NUL before calling vim_strsave_shellescape(). (James McCoy)
This commit is contained in:
Bram Moolenaar
2016-03-23 22:28:25 +01:00
parent ffec3c5349
commit 5ca84ce4aa
4 changed files with 6 additions and 0 deletions

View File

@@ -26439,6 +26439,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);
if (p == NULL)
return -1;