mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:24:36 -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:
parent
ffec3c5349
commit
5ca84ce4aa
@ -26439,6 +26439,8 @@ repeat:
|
|||||||
|
|
||||||
if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S')
|
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);
|
p = vim_strsave_shellescape(*fnamep, FALSE, FALSE);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -35,6 +35,7 @@ STARTTEST
|
|||||||
:Put fnamemodify('abc'' ''def', ':S' )
|
:Put fnamemodify('abc'' ''def', ':S' )
|
||||||
:Put fnamemodify('abc''%''def', ':S' )
|
:Put fnamemodify('abc''%''def', ':S' )
|
||||||
:Put fnamemodify("abc\ndef", ':S' )
|
:Put fnamemodify("abc\ndef", ':S' )
|
||||||
|
:Put expand('%:r:S') == shellescape(expand('%:r'))
|
||||||
:set shell=tcsh
|
:set shell=tcsh
|
||||||
:Put fnamemodify("abc\ndef", ':S' )
|
:Put fnamemodify("abc\ndef", ':S' )
|
||||||
:$put ='vim: ts=8'
|
:$put ='vim: ts=8'
|
||||||
|
@ -25,5 +25,6 @@ fnamemodify('abc"%"def', ':S' ) '''abc"%"def'''
|
|||||||
fnamemodify('abc'' ''def', ':S' ) '''abc''\'''' ''\''''def'''
|
fnamemodify('abc'' ''def', ':S' ) '''abc''\'''' ''\''''def'''
|
||||||
fnamemodify('abc''%''def', ':S' ) '''abc''\''''%''\''''def'''
|
fnamemodify('abc''%''def', ':S' ) '''abc''\''''%''\''''def'''
|
||||||
fnamemodify("abc\ndef", ':S' ) '''abc^@def'''
|
fnamemodify("abc\ndef", ':S' ) '''abc^@def'''
|
||||||
|
expand('%:r:S') == shellescape(expand('%:r')) 1
|
||||||
fnamemodify("abc\ndef", ':S' ) '''abc\^@def'''
|
fnamemodify("abc\ndef", ':S' ) '''abc\^@def'''
|
||||||
vim: ts=8
|
vim: ts=8
|
||||||
|
@ -748,6 +748,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1641,
|
||||||
/**/
|
/**/
|
||||||
1640,
|
1640,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user