mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.1.1497: accessing memory beyond allocated space
Problem: Accessing memory beyond allocated space. Solution: Check column before accessing popup mask.
This commit is contained in:
@@ -6797,14 +6797,18 @@ screen_line(
|
|||||||
if (clear_width > 0
|
if (clear_width > 0
|
||||||
#ifdef FEAT_TEXT_PROP
|
#ifdef FEAT_TEXT_PROP
|
||||||
&& !(flags & SLF_POPUP) // no separator for popup window
|
&& !(flags & SLF_POPUP) // no separator for popup window
|
||||||
&& popup_mask[row * screen_Columns + col + coloff] <= screen_zindex
|
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// For a window that has a right neighbor, draw the separator char
|
// For a window that has a right neighbor, draw the separator char
|
||||||
// right of the window contents.
|
// right of the window contents. But not on top of a popup window.
|
||||||
if (coloff + col < Columns)
|
if (coloff + col < Columns)
|
||||||
{
|
{
|
||||||
|
#ifdef FEAT_TEXT_PROP
|
||||||
|
if (popup_mask[row * screen_Columns + col + coloff]
|
||||||
|
<= screen_zindex)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
c = fillchar_vsep(&hl);
|
c = fillchar_vsep(&hl);
|
||||||
@@ -6828,6 +6832,7 @@ screen_line(
|
|||||||
screen_char(off_to, row, col + coloff);
|
screen_char(off_to, row, col + coloff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
LineWraps[row] = FALSE;
|
LineWraps[row] = FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -767,6 +767,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 */
|
||||||
|
/**/
|
||||||
|
1497,
|
||||||
/**/
|
/**/
|
||||||
1496,
|
1496,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user