forked from aniani/vim
patch 9.1.1021: string might be used without a trailing NUL
Problem: string might be used without a trailing NUL (after v9.1.0997) Solution: Make sure that the buffer is NUL terminated closes: #16457 Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
037b028a22
commit
70dfc374ec
@@ -479,7 +479,10 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
|
|||||||
|| bufIsChanged(wp->w_buffer)
|
|| bufIsChanged(wp->w_buffer)
|
||||||
|| wp->w_buffer->b_p_ro)
|
|| wp->w_buffer->b_p_ro)
|
||||||
&& plen < MAXPATHL - 1)
|
&& plen < MAXPATHL - 1)
|
||||||
*(p + plen++) = ' ';
|
{
|
||||||
|
*(p + plen++) = ' '; // replace NUL with space
|
||||||
|
*(p + plen) = NUL; // NUL terminate the string
|
||||||
|
}
|
||||||
if (bt_help(wp->w_buffer))
|
if (bt_help(wp->w_buffer))
|
||||||
plen += vim_snprintf((char *)p + plen, MAXPATHL - plen, "%s", _("[Help]"));
|
plen += vim_snprintf((char *)p + plen, MAXPATHL - plen, "%s", _("[Help]"));
|
||||||
#ifdef FEAT_QUICKFIX
|
#ifdef FEAT_QUICKFIX
|
||||||
|
@@ -704,6 +704,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 */
|
||||||
|
/**/
|
||||||
|
1021,
|
||||||
/**/
|
/**/
|
||||||
1020,
|
1020,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user