mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.4.562
Problem: Segfault with wide screen and error in 'rulerformat'. (Ingo Karkat) Solution: Check there is enough space. (Christian Brabandt)
This commit is contained in:
@@ -4409,6 +4409,8 @@ get_rel_pos(wp, buf, buflen)
|
||||
long above; /* number of lines above window */
|
||||
long below; /* number of lines below window */
|
||||
|
||||
if (buflen < 3) /* need at least 3 chars for writing */
|
||||
return;
|
||||
above = wp->w_topline - 1;
|
||||
#ifdef FEAT_DIFF
|
||||
above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill;
|
||||
|
@@ -10588,7 +10588,8 @@ win_redr_ruler(wp, always)
|
||||
this_ru_col = (WITH_WIDTH(width) + 1) / 2;
|
||||
if (this_ru_col + o < WITH_WIDTH(width))
|
||||
{
|
||||
while (this_ru_col + o < WITH_WIDTH(width))
|
||||
/* need at least 3 chars left for get_rel_pos() + NUL */
|
||||
while (this_ru_col + o < WITH_WIDTH(width) && RULER_BUF_LEN > i + 4)
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
if (has_mbyte)
|
||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
562,
|
||||
/**/
|
||||
561,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user