0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1086

Problem:    Crash with an extremely long buffer name.
Solution:   Limit the return value of vim_snprintf(). (Dominique Pelle)
This commit is contained in:
Bram Moolenaar 2016-01-10 20:54:17 +01:00
parent a52dfaed10
commit 507edf63df
2 changed files with 4 additions and 0 deletions

View File

@ -2793,6 +2793,8 @@ buflist_list(eap)
(buf->b_flags & BF_READERR) ? 'x'
: (bufIsChanged(buf) ? '+' : ' '),
NameBuff);
if (len > IOSIZE - 20)
len = IOSIZE - 20;
/* put "line 999" in column 40 or after the file name */
i = 40 - vim_strsize(IObuff);

View File

@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1086,
/**/
1085,
/**/