Problem: Using unterminated string.
Solution: Add NUL before calling vim_strsave_shellescape(). (James McCoy)
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;
:Put fnamemodify('abc'' ''def', ':S' )
:Put fnamemodify('abc''%''def', ':S' )
:Put fnamemodify("abc\ndef", ':S' )
+:Put expand('%:r:S') == shellescape(expand('%:r'))
:set shell=tcsh
:Put fnamemodify("abc\ndef", ':S' )
:$put ='vim: ts=8'
fnamemodify('abc'' ''def', ':S' ) '''abc''\'''' ''\''''def'''
fnamemodify('abc''%''def', ':S' ) '''abc''\''''%''\''''def'''
fnamemodify("abc\ndef", ':S' ) '''abc^@def'''
+expand('%:r:S') == shellescape(expand('%:r')) 1
fnamemodify("abc\ndef", ':S' ) '''abc\^@def'''
vim: ts=8
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1641,
/**/
1640,
/**/